@Matt,

Serializing is definitely the right way to go. I'll get into that. And 
of course, I'll use the find method on the query.

Awesome advice. Very appreciative.


Matt Jones wrote in post #1022343:
> On Sep 15, 5:42pm, "Jonathan S." <[email protected]> wrote:
>>     puts "in if statement"
>>     @query = Query.where(:id => params[:id])
>>     params = eval(@query[0].queryString).to_options
>
> Unrelated, but in the name of all that is holy don't do this. Look
> into the 'serialize' method:
>
> http://api.rubyonrails.org/classes/ActiveRecord/Base.html#method-c-serialize
>
> for a cleaner, faster, safer way to stash whole data structures in the
> DB.
>
> --Matt Jones
>
> PS: Also, Query.find(params[:id]) is a good bit more understandable
> than doing a where and then getting the first element.

-- 
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 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