Displaying 20 results from an estimated 1000 matches similar to: "Using form fields that arent in database"
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 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 =>
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
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
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
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
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
2006 Jan 20
47
SQL Server datetime error
i have a problem with the datetime format of rails. i am unable to save
a dataset to the db. here''s the error message -- the original error
message was in german, so i translated it -- i get:
DBI::DatabaseError: Execute
OLE error code:80040E07 in Microsoft OLE DB Provider for SQL Server
Couldn''t convert a char-Datatype to datetime
HRESULT error code:0x80020009
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
Overriding date_select in local project to use custom value rather than blank for starting option...
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
2007 Nov 14
0
Problem time_select with fields_for
Hi,
I''m using fields_for and a time_select but he isn''t saving the time in
the db just 00:00:00
All the other fields are fine, but the time_field isn''t working:s
This is my code:
<% form_for :activity, @activity,:url => {:action => "create"} do
|activity_form| %>
<td><%= activity_form.time_select :datum_1_twrak_van, :order =>[ :hour,
2003 Jul 14
0
Why arent filteres working? (as I wanted)
Here goes the filter statements:
#Initializing traffic control...
tc qdisc add dev br0 root handle 1:0 htb
#Loading queue disciplines for plis230 network...
tc class add dev br0 parent 1:0 classid 1:1 htb rate 512kbit ceil 512kbit
#Loading queue disciplines for pmad048 network...
tc class add dev br0 parent 1:1 classid 1:20 htb rate 30kbit ceil 30kbit
#server queue
tc class add dev br0 parent
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
2006 Oct 13
5
Insert NULL into MySQL "time" not 00:00:00
Ok I''m not sure what I''m doing wrong, but I have a table that holds a
bunch of times, however when I don''t fill in the text box that passes
it''s input on to the variables, rails defaults to 00:00:00, which is
bad, because that''s midnight.
I''m pretty sure I''m doing somethign wrong, and I''m even thinking of
using the
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
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
2004 Dec 16
1
Calls arent handled by asterisk - destruction of call
Hello, I'm trying to get started with asterisk/SIP so I was trying the demo that is provided in the extensions config file, but the call isn't "answered" by my server when I try calling the number that I registered at my SIP provider.
I've registered with register => John.Doe:MyPass:MyUser@my-sip-provider/1000 in sip.conf and if I use "sip debug" I can see the
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
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 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.