order_by From another Model Field

trying to order_by From another Model Field
    if params[:order_by] == 'name'
      @object = Object.paginate(:all, :page =>
self.page_number, :per_page => 50, :order => "#{params[:order_by]}")
    elsif params[:order_by] == 'last_updated_another_model_object'
                       @object
= ???
                 end
Thanks in Advance.

What do want to order by in this case?

Colin

Field name last_update
Model name any_one

Field name last_update
Model name any_one

It is better to post your reply in the appropriate place in the
previous email, it makes it easier to follow the thread. I understand
when you say you want to order by the field last_update, ( :order =>
:last_update ) but what do you mean by sorting on a model named
any_one?

Colin

http://thedevelopercorner.blogspot.com/2009/03/ruby-on-rails-order-by-using-associated.html

I Got It Thanks For Replying all.