Displaying 20 results from an estimated 1000 matches similar to: "Creating new record from a form? (stringify_keys! error)"
2007 Jul 22
2
undefined method `stringify_keys'
Hello
I have a view for user registration but when i try to view this page i
get this error:
undefined method `stringify_keys'' for "username":String
Here''s my registration.rhtml:
<% form_tag :controller => :user, :action => :register do %>
<fieldset>
<label for="username">Username>/label><br/><%= text_field_tag
2006 Dec 14
12
Saving dates
Hi having trouble saving dates in my form i have the following in the
view
<%= date_select("details", "open_date") %>
and i have
@exhibition.open_date = params[:details][:open_date]
and then
@exhibition.save
All the other values form (not seen here) get saved but not the dates.
What am i doing wrong ?
--
Posted via http://www.ruby-forum.com/.
2012 Jan 22
4
undefined method `gsub!' for 2012-01-22 17:00:00 -0500..2012-01-23 00:00:00 -0500:Chronic::Span
Hey all,
I am getting this error:
NoMethodError (undefined method `gsub!'' for 2012-01-22 17:00:00
-0500..2012-01-23 00:00:00 -0500:Chronic::Span):
in this code:
date_range = Chronic.parse(the_date, :guess =>
false)
reports.sum_distance_by_date(date_range).each do |d|
u[:m] << d
end
def
2006 Mar 29
4
trouble adding to database (stringify_keys)
I''m brand new to rails and am trying to build a simple ajax email
collection form. It''s just a coming soon sort of thing where the user
can enter his email address in the field, hit submit, and the ajax form
dumps the email into the database and says "success" unless the email is
blank or not unique in which case it says "failure."
The trouble is, no
2006 Jan 21
1
HELP: NoMethodError (undefined method `stringify_keys!'' for
We have a flash developer who is intergating with a rails application
when
he posts a particular variable (in this case ''rating'') We get a ''Rails
Application
Error'' Trawling the production log turns up this error;
NoMethodError (undefined method `stringify_keys!'' for "10":String):
The html wireframe has no such problem. A select box is
2006 Oct 25
1
Help with a select_tag; getting an undefined method `stringify_keys' error
Hi,
I''m trying to use a select_tag in the following manner:
<%= select_tag(:received_at, @select_dates, String(params[:received_at]) ) %>
But I get this error:
undefined method `stringify_keys'' for "":String
Removing the third parameter eliminates the error, but I was hoping
that the drop-down list will select whichever string in the drop-down
list matches
2006 Nov 20
1
undefined method `stringify_keys!' for "4":String - Meaning of this?
Hi, I have the following on a view
<% for evaluation in @evaluations %>
<td><%=h evaluation[0].name %></td>
<td><%=evaluation[1].object_id %></td>
<td><%= link_to( "Start", :action =>''evaluatie'', :id =>
evaluation[1].object_id) %></td>
<%end%>
When I click on the link, I can see that
2005 Jul 06
4
undefined method `stringify_keys!'
I have a Model whose table name and primary key don''t follow Rails conventions.
So I have used set_table_name() and set_primary_key() and can do the
Record.find() method ok.
My problem is that the Record.new(params[:id]) idiom in a controller complains:
undefined method `stringify_keys!'' for "REAL_PKEY":String
Is there something else I need to do?
2007 Oct 01
3
stringify_keys!
I have seen this numerious times and still have no idea what it means:
undefined method `stringify_keys!'' for "blah22":String
I am tring to change a password. My code looks like:
def change_password
@user = User.find_by_emailaddr( params[:email] )
if @user.nil? # user profile not created
flash[:notice] = "<b style = \"color:red\">No such
2007 Dec 31
2
episode 73 resulting in error: undefined method `stringify_keys!' for "33":String
I''m working with a similar model in Episode 73, (my scenario is
editing multiple pictures for a product using attachment_fu).
And I''m getting an error when I try the technique suggested:
./views/admin/_form.rhtml
<% for picture in product.pictures %>
<% fields_for "product[picture_attributes][]", picture do |
picture_form| %>
Title: <%=
2006 Apr 18
0
undefined method `stringify_keys!'' for "Tue Apr 18 11:26:00 India Standard Time 2006":String
hi all
i am submitting form and i take valu from two text fields.
my controller code is like that
def saleinsert
@verkaufsliste = Verkaufsliste.create(params[:bestandsliste])
@listes = Verkaufsliste.create(params[:verkaufsliste.to_s])
@verkaufsliste=Verkaufsliste.create(@listes.vkdatum.to_s)
if @verkaufsliste.save
redirect_to :action => ''list''
else
2006 Apr 18
0
Re: undefined method `stringify_keys!'' for "Tue Apr 18 11:26
> @verkaufsliste=Verkaufsliste.create(@listes.vkdatum.to_s)
I think it''s better to use strftime(''%d %B %Y'') for .to_s.
strftime is a great function that you can redefine easily (in German for
example ;)
++
o_O Pierre Marchet
--
Posted via http://www.ruby-forum.com/.
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 Dec 22
3
NewbieQ : undefined method `stringify_keys!'' Dumb Question
Hi,
I''m running round in circles again! I''m trying to save a note that has a
HABTM relationship with a job. The note is new - the job exists.
In my partial for notes I have ;
<%= start_form_tag :action => ''new_note'', :id => @job %>
<%= text_area_tag "note", nil, :size => "65x10" %>
<%=submit_tag
2011 Oct 15
2
function for handling time
Dear all
I have the following time stamps (in the following format)
MeasurementSet$TimeStamps
[,1] [,2] [,3] [,4] [,5] [,6]
[1,] 2011 7 2 13 43 48.718
[2,] 2011 7 2 13 43 54.281
[3,] 2011 7 2 13 43 59.843
[4,] 2011 7 2 13 44 5.390
[5,] 2011 7 2 13 44 10.859
[6,] 2011 7 2 13 44 16.375
[7,] 2011 7 2 13 44
2007 Jul 31
11
helper spec not finding rails core helpers
Hi,
My helper specs were going ok until I added a call to a rails
DateHelper method in one of my helpers
http://api.rubyonrails.com/classes/ActionView/Helpers/
DateHelper.html#M000574
The helper runs fine from my view templates, just dies in the spec test.
I boiled my question down to a simple (not too useful) example. I''m
not sure what I''m missing.
#
2009 Oct 22
19
undefined method `stringify_keys!' for "":String
i have an error
undefined method `stringify_keys!'' for "":String
my view is given below
<%= form_tag :action => ''resolve_create'', :resolve => @resolve %>
<p>resolution:<br />
<%= text_area ''resolve'',''content'', :cols => 40, :rows => 12 %></p>
<%= submit_tag
2006 Oct 22
3
Date Helpers?
Does anyone have any ideas off the top of there head how to easily construct
a date helper as one would see in Rails?
Thanks,
Michael Gorsuch
http://www.styledbits.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/camping-list/attachments/20061022/7dda5a52/attachment.html
2009 Sep 25
3
NoMethodError : undefined method `stringify_keys!' for "2":String
Hi,
I have been trying to create a small Rails application. In one of
the steps, I am facing this error as "NoMethodError in
ContactController#update ...... undefined method `stringify_keys!''
for "2":String".
Let me give a brief description of the application. This application
is to Create, View and Update contacts. The problem came when updating
a record.
2006 Jul 30
1
Insert multiple new child records with the parent
Hello,
I am implementing a classic invoice application. On the create new
invoice page
I want to allow users to add new line items using AJAX:
-----------------------------------------------------------------------------
Invoice Date [ ]
Client [ ]
Line Items
1. [ ] $[ ]
<add new line item>
<save> <cancel>