You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When executing the Find method, no exception is thrown if there is no such record.
sample code
—
Models / art.rb
class Art < Rfm::Base
config :layout => 'English_Form_View',
:host => "127.0.0.1",
:port => 16020,
:account_name => "admin",
:password => "xxxxxxxx",
:database => "FMServer_Sample",
:raise_on_401 => true,
:ssl => false
end
—
Controllers / art_controller.rb
class ArtController < ApplicationController
...
def search
begin
@records = Art.find "TextForSearch" => params[:Search]
flash[:notice] = Art.config[:raise_on_401] # true
end
rescue Rfm::Error::NoRecordsFoundError
flash[:notice] = "'#{params[:Search]}' could not be found.”
@records = Art.all
end
end
...
The text was updated successfully, but these errors were encountered:
ginjo-rfm-3.0.12
Rails 6.0.2.2
When executing the Find method, no exception is thrown if there is no such record.
sample code
—
Models / art.rb
—
Controllers / art_controller.rb
The text was updated successfully, but these errors were encountered: