On 23 April 2012 21:13, Shandy Nantz <[email protected]> wrote:
> Even when I try something like:
>
> @obj = "#{params[:model]}".constantize
> @this = @obj.find(:first, :conditions => ["upper(#{params[:attr]}) = ?",
>         params[:"#{params[:model].downcase}"][:"#{params[:attr]}"]])
>
> I still have a null object.

Why complicate things with the conditions when you are trying to get
the basic find going?  What if you just do @obj.find :first
Look in development.log to see what query is being run.

Colin

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

Reply via email to