search for: date_start

Displaying 4 results from an estimated 4 matches for "date_start".

Did you mean: data_start
2006 May 09
0
Problem with date_select
Dates defined chosen with date_select are not coming through once the form is submitted. I have this in a form: <%= date_select ''search'', ''date_start'', :include_blank => true %> <%= date_select ''search'', ''date_end'' , :include_blank => true %> However, when I submit the form params[:search][:date_start] is nil. I have other text fields that are coming through just fine. Somehow rail...
2006 Feb 16
1
Help with validation
...o(:action => "list") else flash[:notice] = "Failed." redirect_to(:controller => ''user'', :action => "request_holiday") end end [/CODE] In my holiday model, I check that the dates have been entered sensibly: [CODE] def validate if date_start > date_end errors.add_to_base("From date cannot be greater than to date") end end [/CODE] I know the validation works because I can get the ''Failed'' flash notice, but I can''t seem to get the error message using error_message_for(:holiday) in the page....
2010 Aug 17
1
MySQL Connect problem...
Right, I'm baffled. I have: exten => s,1,MYSQL(Connect DB1 127.0.0.1 geraint xxx amis2) exten => s,n,MYSQL(Query NORESULT ${DB1} INSERT\ INTO\ recordings\ (caller_number\,called_number\,date_created\,date_started\,in_use\,server_id)\ VALUES\ (\'${CALLERID(number)}\'\,\'${ARG1}\'\,NOW()\,NOW()\,\'Yes\'\,12)) exten => s,n,MYSQL(Query RESULT1 ${DB1} SELECT\ LAST_INSERT_ID()) exten => s,n,MYSQL(Fetch FOUND1 ${RESULT1} VALUE1) exten => s,n,MYSQL(Clear ${RESULT1}) exten => s,...
2006 Aug 02
1
ActiveRecord: find_or_create with has_and_belongs_to_many --
...id = school_term.term_id WHERE (school_term.school_id = 1 ) AND (term.`code` = ''FALL06'' ) LIMIT 1 but the INSERT behavior does not include a join table insert if the SELECT does not find an appropriate record: INSERT INTO term (`code`, `name_full`, `name_common`, `date_end`, `date_start`) VALUES(''FALL06'', NULL, NULL, NULL, NULL) I have resolved this by changing my original code to implement a uniqueness check in ruby: term = school.terms.find_or_create_by_code("FALL06") school.terms << term unless school.terms.any? do |i| i == term; It seems li...