ruby on rails - NoMethodError: undefined method `get' for #<Class:0xc3ba52c> -


i have project totally api 1 returning json response. have affiliation table associated other information. information in tables being fetched through rake task. issue is, project running fine not when run rake task gives error in .get method such

nomethoderror: undefined method `get' #<class:0xc3ba52c> /home/munam/.rvm/gems/ruby-2.1.4/gems/activerecord-4.1.6/lib/active_record/dynamic_matchers.rb:26:in `method_missing' 

here have used :

@affiliation = affiliation.get('my_key') 

if change

@affiliation = affiliation.find_by_key('my_key') 

it works fine. unfortunately not have access rights change in it. not understand why has method stopped working @ sudden.

i read on here: http://api.rubyonrails.org/v3.2.1/classes/activeresource/custommethods.html#method-c-get

can not make work other way: need integration work properly. thankful if helps.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -