String to model name in active record

Hello,
Is there is a simple way to convert string to model name?
Thanks

On Mon, Jun 15, 2009 at 7:38 PM, Misiek Sz
<[email protected]

wrote:

Hello,
Is there is a simple way to convert string to model name?
Thanks

“Model”.constantize
http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/String/Inflections.html#M001341

Andrew T.
http://ramblingsonrails.com

http://MyMvelope.com - The SIMPLE way to manage your savings

BIG THANKS.

Andrew T. wrote:

On Mon, Jun 15, 2009 at 7:38 PM, Misiek Sz
<[email protected]

wrote:

Hello,
Is there is a simple way to convert string to model name?
Thanks

“Model”.constantize
http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/String/Inflections.html#M001341

Andrew T.
http://ramblingsonrails.com

http://MyMvelope.com - The SIMPLE way to manage your savings