On Sep 15, 5:42 pm, "Jonathan S." <[email protected]> wrote: > Summary of problem: my params hash is being made nil in my controller > without any reason that I can identify. > > Everything was fine until I put this new code as the first lines of code > in my controller. But the block is not being executed because the puts > statement is not evaluated: > > def calculate > > if params[:id] > 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. -- 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.

