[Rails] Re: how call method from model to controller in rails 3

2012-10-06 Thread fahim patel
Pab wrote in post #1027023: @Tim thanks for your help, your idea works fine thanks, -pab Thanks u all Regards Fahim Babar Patel -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to

[Rails] Re: how call method from model to controller in rails 3

2011-10-17 Thread Pab
@Tim thanks for your help, your idea works fine thanks, -pab -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to

[Rails] Re: how call method from model to controller in rails 3

2011-10-14 Thread Pab
hi, still same error comes undefined method 'list' thanks, -pab -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to

Re: [Rails] Re: how call method from model to controller in rails 3

2011-10-14 Thread Colin Law
On 14 October 2011 14:35, Pab prabu.ne...@gmail.com wrote: hi,  still same error comes   undefined method 'list' Show us the current code and the error please. Also please remember to quote the previous reply so we know what you are replying to. Colin -- You received this message because

[Rails] Re: how call method from model to controller in rails 3

2011-10-14 Thread Pab
hi, in employee controller def show @stamp=Sale.new.list end in sale.rb model i am using def self.list @list=Sale.find(:all) return @list end its shows following error undefined method 'list' thanks, -pab -- You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Re: how call method from model to controller in rails 3

2011-10-14 Thread Tim Shaffer
Now you have the opposite problem... You are now calling list as an instance method and you have it defined as a class method. You need to do ONE of the following. Define it as a class method, and call it as a class method: def self.list code end @list = Sale.list Define it as an instance