Displaying 20 results from an estimated 57 matches for "stringify_key".
Did you mean:
stringify_keys
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 user...
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 ''user'',
nil...
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 used to submit
the data
in the style of.
rating[rating]
Here is the ''def'' in the controller;
def rate
dream = User.find(params[:id])
rating = Rating.new(params[:rating])...
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 params[:received_at].
Thanks in advance!
-Al
--~--~---------~--~----~------------~-------~--~----~
You recei...
2006 Nov 20
1
undefined method `stringify_keys!' for "4":String - Meaning of this?
...>
<%end%>
When I click on the link, I can see that I do get a Parameters:
{"id"=>"4"} request.
In my controller I just have
def evaluatie
idee = Evaluation.new(params[:id])
@ideename= idee.name
end
For some reason, I get the message "undefined method
`stringify_keys!'' for "4":String"
Can anyone explains what that means? It is the first time I encounter
this.
Many thanks for any reply.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails:...
2007 Dec 31
2
episode 73 resulting in error: undefined method `stringify_keys!' for "33":String
...re do |
picture_form| %>
Title: <%= picture_form.text_field :title %>
<% end %>
./models/product.rb
def picture_attributes=(picture_attributes)
picture_attributes.each do |attributes|
pictures.build(attributes)
end
end
undefined method `stringify_keys!'' for "33":String
Parameters: {"commit"=>"Edit", "product"=>{"image_url"=>"shep.jpg",
"price"=>"400.00", "title"=>"German Shepard Lab Mix #2b",
"category_ids"=>...
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?
2005 Dec 22
3
NewbieQ : undefined method `stringify_keys!'' Dumb Question
..."job"=>{"job_state_id"=>"2", "current_action_id"=>"7",
"job_phase_id"=>"2", "job_wait_state_id"=>"4"}, "note"=>"xzczcxvzxcvzxc"}
The error message is;
undefined method `stringify_keys!'' for "xzczcxvzxcvzxc":String
And the trace is ;
d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:1333:in
`attributes=''
d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:1188:in
`initialize_without_callbacks'...
2006 Aug 04
5
Creating new record from a form? (stringify_keys! error)
...@stat.height = params[:height]
if @stat.create
flash[:notice] = "successfully saved"
else
flash[:notice] = "FAILED"
end
else
render_partial ''newStatInfo''
end
end
When run I get " undefined method `stringify_keys!'' for "08 / 04 /
2006":String "
I''m pretty sure I''m not creating the record properly but I thought is
was as simple as "Biostat.new"
the only condition is that ''data'' cannot be null.
--
Posted via http://www.ruby-forum.com/...
2006 Mar 29
4
trouble adding to database (stringify_keys)
...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 matter what I seem to do, when I actually go to
create the new row in the database, I get the same error:
undefined method `stringify_keys!'' for "test@test.com":String
I''ve tried messing with .to_s but that doesn''t help. Searching on
google for that error message hasn''t turned up anything helpful. I''m
really stuck and would greatly appreciate some help
Thanks,
Aaron Powell...
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/.
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...
2007 Mar 23
1
How does this helper work? (agile book)
Hello,
Im trying to understand how this helper method works:
def hidden_div_if(condition, attributes = {})
if condition
attributes["style"] = "display: none"
end
attrs = tag_options(attributes.stringify_keys)
"<div #{attrs}>"
end
This is how they are calling it:
<%= hidden_div_if(@cart.items.empty?, :id => "cart") %>
Specifically, I need to know if the :id => "cart" is passed on to attrs
with the style attribute...
And also, what does the tag_...
2006 Mar 09
2
clarify
...t;Parameters #{params}"
end
def list
params = request.parameters
@entry = GuestBook.new(params[:name])
@entry.save
redirect_to :action => "index"
end
end
------------------------------------------------------------
i get the error " undefined method `stringify_keys!'' for "name1":String "
while the list function is executed
"name1" which i get in the error is the value which i gave for the field
name.
------------------------------------------------------------
cud u help me to get rid of the error ?
-------------- next pa...
2006 Apr 17
6
acts_as_taggable confused
Ahoy,
So i''ve installed the acts_as_taggable module and everything is fine,
but i''m a bit confused about this bit of code described in the API
"photo = Photo.new
# splits and adds to the tags collection
photo.tag "wine beer alcohol"
# don''t need to split since it''s an array, but replaces the tags
collection
# trailing and leading
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.
The "Update" action in controller file looks like this,
def update
@...
2007 Dec 06
3
number_to_currency
...live in the uk and
the company want me to only show values of the pound of course.I have
created all my application using ruby script/generate
scaffold_resource.... I have come across with a problem... this code is
in my applcation:
def number_to_currency(number, options = {})
options = options.stringify_keys
precision, unit, separator, delimiter = options.delete("precision") {
2
}, options.delete("unit") { "£" }, options.delete("separator") { "." },
options.delete("delimiter") { "," }
separator = "" unless precision &g...
2007 Jul 24
2
Nested params and redirect_to
...t;=>"last_namesmithfirst_namejane",
"controller"=>"client"}
ie it is not nesting the "client_search" hash and I get the following
error when trying to update the attributes on the client_search table
using these params:
NoMethodError (undefined method `stringify_keys!'' for
"last_namesmithfirst_namejane":String):
E:/RailsApps/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/
active_record/base.rb:1668:in `attributes=''
E:/RailsApps/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/
active_record/base.rb:1591:in `update_at...
2006 Jul 08
10
A rant about parameters
...elpers, can be called
straight?
Compounding the problem (and confusing me) was this method further down
in the call stack:
----
module ActionView::Helpers
class InstanceTag
def to_country_select_tag(priority_countries, options, html_options)
html_options = html_options.stringify_keys
add_default_name_and_id(html_options)
content_tag("select",
add_options(country_options_for_select(value, priority_countries),
options, value), html_options)
end
end
end
----
Can anyone tell me how value here could *ever* have a value?
Thanks for liste...