Displaying 1 result from an estimated 1 matches for "dict_nam".
Did you mean:
dict_name
2014 May 26
0
Finding a record which I had created
...e is unique:
validates :dictname,
presence: true,
length: { minimum: 3 },
format: { with: /\A\D/ },
uniqueness: true
In my controller, I tried this to fetch a Dict object, when the value
for the :dictname field is stored in variable dict_name:
if Dict.exists?(:dictname => dict_name)
logger.debug('found dictionary with name '+dict_name)
dictid=Dict.where(:dictname => dict_name).select('id').first.id
logger.debug('dictid='+dictid.inspect)
@dict=Dict.find(dictid)
However, the line to...