search for: discard_typ

Displaying 9 results from an estimated 9 matches for "discard_typ".

Did you mean: discard_type
2005 May 08
3
Overriding date_select in local project to use custom value rather than blank for starting option...
I would like to have a date control on a page and I would like a behavior similar to what you get using date_select with the :include_blank => true option where the first value in the dropdown is "- Month -", "- Day -", or "- Year -" rather than a blank value for the respective month, day, and year select fields. I took a look at the ruby source for
2008 Jul 04
4
Routing and Parameters
...vious problems of invalid data.) I''m trying to create a form that will allow my users to navigate from one month/year to the next. Here''s my form: <% form_tag(tasks_path, :method => :get) do %> <%= select_month(Date.today, :prefix => ''month'', :discard_type => true %> <%= select_year(Date.today, :prefix => ''year'', :discard_type => true %> <button>go</button> <% end %> If you submit this form, the request generates an URL like this: / tasks?month=7&year=2008 sent to the #index method on Ta...
2006 Jul 18
1
Auto-populating time portion of a datetime field from a form
I see that if I use the date_select helper in my view, then in the generated page, my selects are named obj[datetime_field(1i)] (and 2i and 3i for the other parts). These auto-populate the date portion of my datetime_field. I have another datetime field that I''m presenting the time from and I would like to use a similar scheme to autopopulate it. Currently, I''ve used the
2006 Jul 26
2
text_field and date_select in collection
...there. BUT i do not know, how to achieve this with the date_select helper? the helper generates: <select name="book[published_on(2i)]"> <option value="00">00</option ... it should be name="book[12][published_on(2i)]" how to do that? (:prefix, :discard_type did not work for me) thanks ondrej
2008 Jun 09
3
Rails 2.1 and ddatetime_select
I''ve updated to 2.1 and am continuing to have issues with datetime_select helpers which worked fine previously. Example: <% form_remote_tag(:url => { :controller => ''notes'', :action => :add_booking_note_ajax, :id => @booking},
2006 Jun 13
1
How to give conditions in rails
...t;</b> </td> </tr> </table> <br> <br> <p> <h1 align="center"><i>List of Holidays</i></h1> </p> <br> <% if @holidays.length > 0 %> <% d=select_year(2006,:prefix => "year",:discard_type => true) %> <p align="right"><%=d%><%= submit_tag("Ok", :id => ''form-submit-button'') %></p> <table cellpadding="5" cellspacing="0" border="3" align="center" width="50%" b...
2006 Feb 05
0
How can i specify default time to datetime_select tag
...fferent default time to datetime_select tag how can i do that. also i was looking at rails helper code ----------------------------------------------------------------------- module ActionView module Helpers module DateHelper def to_datetime_select_tag(options = {}) defaults = { :discard_type => true } options = defaults.merge(options) options_with_prefix = Proc.new { |position| options.merge(:prefix => "#{@object_name}[#{@method_name}(#{position}i)]") } datetime = options[:include_blank] ? (value || nil) : (value || Time.now) dateti...
2006 Jun 16
3
finding out about options
I''ve been to the RoR api docs trying to find out about options for various methods (mostly for select helper methods), yet I find no listing of options even when the method described says that it takes options. How can I find out what are valid options say for a date_select tag? Thanks, Dave
2006 Jun 02
6
overriding constants
...ned?(:DEFAULT_FIELD_OPTIONS) DEFAULT_RADIO_OPTIONS = { }.freeze unless const_defined?(:DEFAULT_RADIO_OPTIONS) DEFAULT_TEXT_AREA_OPTIONS = { "cols" => 40, "rows" => 20 }.freeze unless const_defined?(:DEFAULT_TEXT_AREA_OPTIONS) DEFAULT_DATE_OPTIONS = { :discard_type => true }.freeze unless const_defined?(:DEFAULT_DATE_OPTIONS) but if I add a simple declaration in my environment.rb, nothing seems to happen (even after webserver reboot): DEFAULT_FIELD_OPTIONS = { "size" => 30, "class" => "text" } DEFAULT_TEXT_AREA_OP...