Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Can I use a check_box to implement a date related search? (i.e. show only expired accounts) #86
This works fine, however I want to use it as a check box
<%= f.text_field :user_profile_expiration_lt, :value => Date.today.to_s(:long) %>
if checked then result set contains only where results with expiration less then today.
i.e. Show only expired 
Any ideas how to do this?
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
I've just been hit by a bug using this method @graywh, if I declare my scope with a lambda, I get the following error:
To make it work, I need to painfully add a management of the checkbox value, this way: