Re: [Rails] Re: How to pass model names?

2010-04-28 Thread Michael Pavling
On 28 April 2010 11:45, Hemant Bhargava wrote: > Thanks dude.. It worked like a charm.. i was not aware of this keyword.. It's one of the Inflector methods... well worth being familiar with them: http://api.rubyonrails.org/classes/Inflector.html -- You received this message because you are subs

[Rails] Re: How to pass model names?

2010-04-28 Thread Hemant Bhargava
Michael Pavling wrote: > def all_record_ids(model_name) > �all_records = model_name.constantize.all.find_all { > � �|record| record.status == "ACTIVE" > �} > end Thanks dude.. It worked like a charm.. i was not aware of this keyword.. :) -- Posted via http://www.ruby-forum.com/. -- You receiv