search for: date_helpers

Displaying 19 results from an estimated 19 matches for "date_helpers".

Did you mean: date_helper
2006 Jul 13
3
date_helper megapatch and MultiparameterAssignmentErrors
...ignmentErrors. This used to work in 1.0, Februari 30th would be translated to March 2nd. I have no clue on how this could be fixed since the Error is thrown deep inside. I was going to create a ticket for this, but Trac isn''t working to well at the moment. It would be great if the date_helpers could get some love, they''re basically broken and useless in the current state. Is there any core member out there who could take a look at this? Thanks, Thijs Cadier
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 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 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
2007 Feb 21
2
date helper bug?
...words (which just passes on to distance_of_time_in_words) it miscalculates the difference as "9 hours" (...um yeah, it was 10:54 when I tested this), when the difference should have been "1 hour". So I fired up script/ console to see what was going on... # setting up to use the date_helpers... >> helper.extend ApplicationHelper => #<Object:0x391bfd8> # my record from SQL server returns time like this... >> t.updated_on => "\"2007/02/20 15:09:04\"" >> t.updated_on.class => String # so make a string in same format that represents ~1...
2008 Jul 04
4
select_datetime // datetime_select
Hi I have 2 question for you guys, 1. Which is the difference between this two methods? (select_datetime, datetime_select) 2. How I assign the selected date-time values, to an specific variable or array using select_datetime I know do it using datetime_select(''object'',''method'') I aprecciate your attention. Thanks PD: Sorry about my english.
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 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 Dec 18
1
Bad merge of r5686 from trunk to 1.2-pre-release?
I do not closely follow the core source commits, but please bare with me. I will keep it short. Recently, changeset#5685 [1] caught my attention as I''ve been waiting for some date_helper love for a VERY long time. What bothered me is that when this changeset was merged into the 1.2- pre-release branch (at changeset#5686 [2]) a change to caching.rb crept in [3], which was not in
2005 Nov 04
0
RE: Why class InstanceTag is defined at 4 different places inRails
In Ruby you can add and modify existing classes at will simply by reopening it. The 4 files you mention add functionalities to the InstanceTag class. This is not a redefinition. The best part is that you can do the same ! An easy way to overwrite an existing method or to add new ones is to create a file under you rails application lib directory and put in it the replacement you want to make:
2005 Dec 01
0
Problem using a date helper
Hi, I''m having trouble getting a date helper working. I was pointed to this by Sean Allen, and it resides at http://theredheadedstepchild.net/articles/2005/08/04/datehelper-fixes It''s meant to fix the bug in Rails which doesn''t allow datetime_select to properly discard the year. So, I''m trying to use the helper''s time_select function. date_helper.rb
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 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
2005 May 02
1
datetime_select and discard
ok so datetime_select if you use the discard options say { :discard_month => true } when you just do update_attributes on said object year would be correct month would be the hour date would be the minute so if you select year: 2005 hour: 12 minute: 13 the time object would go into the db as: ''2005-12-13 00:00:00'' so my question is how do i get the time object properly
2008 Mar 17
0
Nil dates in selct_date
Can one specify to date_select that a nil value is permitted and is the default value? Is it possible to add nil to the list of permitted values in a date_select call? The code in /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_view/helpers/date_helper.rb seems to treat nil as now. 654 def default_time_from_options(default) 655 case default 656
2006 Mar 10
6
How do i apply a patch?
Hi, i have a patch to make instiki work with the latest version of ruby : as_clean_logger_rb-fixed.patch But i dont know how to apply it. Any ideas?? Thanks, Chris -- Posted via http://www.ruby-forum.com/.
2008 Feb 03
4
Testing helper/view methods from script/console
Hi, Is it possible to test helper/view methods from script/console. I want to test the output of methods like distance_of_time_in_words. But it won''t let me from the console. What am I missing? TIA Luke -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on
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},