Skip to content

Instantly share code, notes, and snippets.

@Parashar-xx
Created May 23, 2011 06:53
Show Gist options
  • Save Parashar-xx/986334 to your computer and use it in GitHub Desktop.
Save Parashar-xx/986334 to your computer and use it in GitHub Desktop.
Selecting all values from list
<% form_tag @maps, :method => 'get' do %>
<label>Campaign Id:</label>
<%= select_tag "campaign_id", options_from_collection_for_select(@campaign, "id", "title" ,prompt="all") %>
<label for="from">From</label>
<%= text_field_tag :from, @from.strftime("%d-%m-%Y") || Date.today.beginning_of_month.strftime("%d-%m-%Y")%>
<label for="to">to</label>
<%= text_field_tag :to, @to.strftime("%d-%m-%Y") || Date.today.end_of_month.strftime("%d-%m-%Y") %>
<%= submit_tag "Update" %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment