Displaying 20 results from an estimated 90 matches similar to: "Problem time_select with fields_for"
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 Aug 07
0
Newbie: Want to use time_select to partial fill a datetime field
Hello
Our Database schema, and hence Our Model has a few datetime columns/
fields. But when entering new instances, We only want to present time
(i.e. HH:MM) in in our HTML views to the user. The time_select looks
useful, because it has an attractive minute_select: =>15, so the user
can enter 1/4 hours increments. The idea being that we would default
the Date part of Datetime attribute to
2007 May 18
0
Default select values for time_select
How can I set the default selected values for the time_select fields? I
would like the selected values to bet set at 0 instead of the current
time.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2006 Feb 07
9
Is there a good time_select tag helper?
I''m trying to record a list of start and end times, and they''re simply
an hour and a minute. Looking at the API, there''s a select_time
helper, but that just creates the tag. There''s a datetime_select
helper which takes an object and method name, so it does all the
magic...but I only want to worry about the hour and the minute. I''ve
tried writing my
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
2011 Jul 14
0
MultiparameterAssignmentErrors
The attached file show the error I''m getting.
I have a time time in my migration and a time_select:
<%= f.fields_for :company_layout do |company_layout_form| %>
<p>
<%= company_layout_form.label ''HorĂ¡rio de abertura'' %>
<%= time_select(''company[company_layout_attributes]'', :opening_hours,
:ignore_date => true,
2006 Mar 21
5
Getting a time select input
I''m having trouble workign out which ActionView DateHelpers to display a
time input for an ActiveRecord field of type :time.
I just want an hours input and a minuites input. I can get these with
time_select helper using :field_name and :prefix but it gives both hours
and miniutes the same name.
<%= select_time(Time.now, :prefix => "search", :field_name =>
2008 Sep 11
2
time value won't come back from UTC
Hi there,
I''m fairly new to RoR, and I seem to be having a problem with :time
types.
I save my times with a time_select on my form, to a time type field on
MySQL.
Rails automatically pulls it back to UTC from my timezone (+02:00),
but when I display it again, it stays at the UTC value, i.e. I enter
in 6:30, and I get 4:30 on my list.
Is it just me, or is this a limitation of the time
2008 Mar 05
1
Using form fields that arent in database
Basically I need to know how to use forms fields when the attribute name
for it
doesn''t match a field in my database. I have a form like this.
<td><%= date_select ''assessment'', ''ends_at_date'', :value => "Click
here..." %>
<%= time_select ''assessment'', ''ends_at_time''%></td>
My
2006 Jan 29
0
Active Record and Time support
Anyone know why ActiveRecord and the associated helpers is lacking in Time
support?
I have 2 time fields in my table. I have to manually handle their input and
storage instead of using any helpers, which don''t exist.
Just curious as to why something like time_select doesn''t exist.
Bob Silva
http://www.railtie.net/
-------------- next part --------------
An
2008 Oct 15
0
Combine date and time in mysql
I have a date from a calendar_date_select and a time from a time_select.
They go to a date field and a time field in mysql. How do I combine time
and date on both sides to make a comparison in a find?
I think this is on the right path, right?
DATE_ADD(start_date, INTERVAL start_time HOUR_SECOND)
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You
2008 Mar 05
1
How to use values through forms
Basically I need to know how to use forms fields when the name for it
doesn''t match a field in my database. I have a form like this.
<td><%= date_select ''assessment'', ''ends_at_date'', :value => "Click
here..." %>
<%= time_select ''assessment'', ''ends_at_time''%></td>
My database has
2006 Jul 17
2
DB Admin Console
Over the past few months, I''ve developed an administrative console for
databases in the process of solving other problems.
At the moment, the state of development is:
* Going to /admin_panel/model will bring you to a list of items in the
model:
* Supports acts_as_list via drag/drop sorting
* Supports "activated" via an activated/deactivated button
* Supports basic
2005 Dec 23
6
Selecting time
I''m currently building a small app that''s going to be used to keep track
of the amount of time spend on customers of the company I work for.
This mainly consists of object with a begin time, an end time and a
calculation of the difference between those timestamps (actual time
spend on the job).
I made a small form with a datetime_select helper for the begin and end
time (the
2006 Jul 26
4
yhtml plugin
I have released a yhtml plugin, which is available at
http://http://svn.visualjquery.com/admin_console/trunk/admin_console/vendor/plugins/yhtml
You can also get my other plugins, specificlly: the pre-alpha
administrative console (AJAX-based scaffolding engine),
acts_as_automatic, which allows you to define associations in a single
yaml file, and not need to define has_many, has_one,
2006 Mar 21
5
Use select_date for my model?
Hi all
I have a model "party" that has a time field "starts_at". I have created
a form to add new instances of this model.
<%= select_date Date.today, :prefix => ''party'' %>
Sadly I get the error:
NoMethodError in Parties#add
undefined method `month='' for #<Party:0x256a600>
How can I fix this problem? I remember that I saw in
2006 Mar 12
3
select_time help needed (Noob)
I can''t seem to get a handle on how the select_time helper is supposed
to work. I''m a complete noob to rails so bear with me please. I''m trying
to add fields to a form to allow for time (hh:mm) selection ie. call
received, enroute, etc.. I don''t understand how one maps the form data
to the table object and field ie. calls table recieved field.
2007 Jun 22
2
problem with AR and 'virtual' multiparameter attributes.
Hello,
I have a model which I would like to have a ''virtual'' date column.
This column wouldn''t exist in the database, but would exist for
validation, etc. The data would be provided in the form of a
date_select in the view. This produces a multiparameter attribute. My
problem is that the ''execute_callstack_for_multiparameter_attributes''
method in
2006 May 27
10
Displaying Hours
Here''s an intersting one:
I have a client who wants to store hours of operation of a business for
their RoR web app. I came up with a solution, but I really don''t like
it.
I have a MySQL table that has these fields
monday_start, monday_end, tuesday_start, tuesday_end, etc., all as time
fields.
That''s all find and dandy. The kicker is, the client wants the hours to
2007 Nov 02
1
1 error(s) on assignment of multiparameter attributes - Very Strange
Hello...
Well, I post this one without too much hope that someone will be able
to give me an answer, because it is strange.
I have a time select field, the field on the database is of type time
only.
When creating a document, as long as the time is not greater than
14:00, then it saves as 00:00, but if the time is greater than 14:00
and less than 22:00 then it throws this error:
1 error(s) on