Xie Hanjian wrote:

> orderby = case @order
>           when 'user' then 'user'
>           when 'score' then 'score DESC'
>           else 'updated_on DESC'
>           end

That's better than mine by preserving the DESC.

But why the params and session themselves don't contain the real code - 
'updated_on DESC'. The View could, for example, show 'date' to the user and set 
its value to 'updated_on DESC'. Then all this fun goes away!


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