similar to: Nil dates in selct_date

Displaying 20 results from an estimated 4000 matches similar to: "Nil dates in selct_date"

2006 Mar 15
1
Strange behaviour of dates
Imagine a crud app that tracks people applying for a loan, here is the layout I have: Mysql database: create table apps ( id int auto_increment primary key, primary_id int not null, secondary_id int null, constraint fk_primary_id foreign key(primary_id) references (contacts.id), constraint fk_secondary_id foreign key(secondary_id) references (contacts.id)) create table contacts ( Id int
2008 Jun 26
2
Problem with date_select after Rails 2.1 upgrade
Folks, I think I should start a new thread for this, because a similar one I saw is a bit old and the resolution there doesn''t seem to apply to what I''m running into now. Anyway, my date_select calls are bombing on me with the exception: ---- ActionView::TemplateError (wrong number of arguments (3 for 2)) on line #8 of entries/_dates_form.haml: 8: = date_select(
2006 May 03
2
Using a helper within another helper?
I am trying to push some view logic into a helper. The thought is that this is a step towards having the business logic in the helper rather than the view. However, I''m essentially wrapping the checks around an eventual call to date_select(). The problem I''m having is that the application complains that it doesn''t know about date_select(). I''m sure (or
2005 Mar 12
0
scaffolding issue
i''ve got a little rails app i''m messing with the schema is create table timedatevalidates ( id serial, timedatetovalidate timestamp, primary key (id) ); the mvc was initialized using rails scripts/generate scaffold timedatevalidate i''ve got this in a subdir of webroot and have modified .htaccess and config/routes.rb like so .htaccess :
2006 Mar 10
14
Oracle Date type errors rails on edit
I have a table with "expires_on" a DATE field. "Show" and "Destroy" work, but "Edit" errors: /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_view/helpers/date_helper.rb:150:in `select_hour'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_view/helpers/date_helper.rb:149:in `select_hour'' It only happens when
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
2006 Jan 23
11
mysql dates
does anyone know of a way to make the date_helper deal with mysql dates with 00 values in them? I have lots of dates that are like the following: 2005-04-00 2005-00-00 and I need to set null values in a date_select for elements that are 00. These are valid dates in mysql. In the absence of an immediate solution to the above, I''ve been trying to find out how InstanceTag.new works so I can
2006 Apr 28
5
Newbie: using date-picker
Finally found a nice date chooser script (http://projects.exactlyoneturtle.com/date_picker), but am a little confused how to implement it. So I put this where I need the date picker: <a id="_name_link" href="#" onclick="DatePicker.toggleDatePicker(''name'')" class="demo_link">[ choose date ]</a> <div
2007 Apr 17
1
undefined method `each'' for nil:NilClass with Ferret search
Hi All: For certain key terms I always get this error; I had to rebuild the indexes then it works for a while then again it is gone. here is the message ActionView::TemplateError (undefined method `each'' for nil:NilClass) on line #4 /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_view/base.rb:316:in `compile_and_render_template''
2006 Apr 21
3
Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id
Hi I am a newbie to Ruby on Rails, but experienced in programming. I am trying out Rolling with Ruby on Rails article by Curt Hibbs on onlamp.com. I have encountered following error: Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id I searched the archives of the list and found that similar question was left unanswered. I do understand from
2009 Jan 11
2
Got an error on returning data as json format when the data is nil
Hi there, One of my app''s actions returns data as a json format. If the data exists, everything works perfect. But if the data is nil, I get the following error. -------------------------------- ActionView::MissingTemplate (Missing template user/show.erb in view path /var/www/my_app/releases/20090110234348/app/views:):
2013 Mar 14
0
[Rails 3.2] accepts_nested_attributes_for and time_select
Hi, I am upgrading a Rails application from Rails 3.1.11 to 3.2.12, but have a problem with ` accepts_nested_attributes_for` in conjunction with multipart attributes. The app is used to manage oral exams, so there is a model `Exam`, which has many `Examdate`s. When creating an exam, I can also create the examdates, consisting of a date, a start time and an end time. While the date field is
2007 Jan 11
6
nil object while the required parameter are in the request
I''m having an application as follows. I have all the parameters for as object appended in the url. And there is an action in the controller like this def newlet render :layout=> false @product = Product.new if request.get? @product.title= params[:title] @product.description = params[:description] @product.primary_link = params[:primary_link]
2006 Jan 20
13
Calendar date picker for use with rails.
Howdy folks, As I was putting together a rough form for a rails app, I got to thinking how much smoother (in my siytuation) a little calendar widget would be than the default date picker selects. Does anyone know if such a thing exists ? I suspect it would have to be somewhat designed with rails in mind to populate the right kind of post params for convenient use at the controller end.
2009 Apr 04
11
rake aborted! undefined method `empty?' for nil:NilClass
Hi, I''m getting the next errors, would anyone have any suggestions? Thanks. [~/rails/hip]# rake --trace db:migrate RAILS_ENV="production" (in /home/domain/rails/hip) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment rake aborted! undefined method `empty?'' for nil:NilClass /usr/lib/ruby/1.8/erb.rb:469:in `scan''
2010 Oct 21
4
Authlogic + Rails3 - undefined method `Login' for nil:NilClass
Im new to Rails, and decided to start of with Rails3. After a lot of searching ive managed to get a little bit of Authlogic working. I''m able to register a user, login & logout. Now, I would like to add more features, get more of authlogic working. I''m using Railscast EP 160 as my reference. Portions of the code found on the tutorial throw errors: Eg: <!--
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 11
5
What are people using for date fields
I''m just curious about what techniques others have successfully used to capture date data on forms as an alternative to the standard date_select. I have to admit I''ve been lazy and only used the date_select as we have very few dates in our system now, but that is about to change. I would like something better. Any thoughts? -- Thanks, Sam -------------- next part
2005 May 31
2
Form Dates and MultiparameterAssignmentErrors
I''m using the date_select form helper for a date_of_birth field on an ActiveRecord object. When I try to save a date earlier than 1 Jan 1970, ActionController punts with ActiveRecord::MultiparameterAssignmentErrors. The message it gives is "1 error(s) on assignment of multiparameter attributes". I was able to catch the exception and look at it, and it is certainly complaining
2011 Jan 04
1
Problem with "date_select" form helper
Hi, I am using "date_select" form helper to select the date. My code is as follows:- <%=date_select("post", "written_on", :prompt => { :day => ''Select day'', :month => ''Select month''}, :discard_year=>true)%> It works. But there is problem with the number of days for each month. The days combobox has populated with