On 19 October 2011 17:04, PsiPro <[email protected]> wrote:
> I have used ransack, but what you are looking for is not directly
> implemented.
>
> You have two options:
> 1) Use a database specific syntax such as EXTRACT

I have a form like this:

= simple_form_for @q, :url => unsafe_buildings_path, :html => {:method
=> :get} do |f|
  .block
    .column.span-11
      .inputs
        = f.label :practice_number_eq, t('practice_number')
        = f.input :practice_number_eq, :label => false, :required => false
        = f.label :property_cont, t('property')
        = f.input :property_cont, :label => false, :required => false
        = f.label :practice_date_in, t('practice_date')
        = f.input :practice_date_in, :as => :date, :label => false,
:required => false,
                  :start_year => Settings.unsafe_buildings_start_year,
:include_blank => true
        = f.button :submit, "Cerca"

I want to search also for practice_date where based on year.
I'm using postgres as db.
How can I integrate "extract" in this form?

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