Ruby on Rails Tuesday, April 2, 2013

Hello All,


I want to pass conditions in respond_with like this:

user = User.where("updated_at >= :start_date AND updated_at <= :end_date", {:start_date => some_date, :end_date => Time.now})
respond_with(user, :include => :sub_users)

I need to pass the same parameters in case of sub users.

How can I achieve this?


Thanks,
Avi 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/xiicnqcIABsJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment