Good morning,

I'm trying to dynamically define models.

This method #1 works:
model_name = User
@Model = model_name
@Model.find(params[:id]).name

This method #2 doesn't:
model_name = "User"
@Model = model_name
@Model.find(params[:id]).name

Anyone know how I can get method #2 to work?  Is there something I can
tack onto the end of 'model_name' to get it to know that it's a model?

Thanks,

Frank

-- 
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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to