Displaying 20 results from an estimated 5000 matches similar to: "HELP: NoMethodError (undefined method `stringify_keys!'' for"
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 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 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 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
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 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
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.
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
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?
2006 Aug 04
5
Creating new record from a form? (stringify_keys! error)
Appologies if this has been covered, But it seems the search is busted.
I have a simple model object "Biostat" which I am trying to add a new
record to.
this is the form:
<%= form_remote_tag(
:update=>''statsTable'',
:url=>{:action=>''new''},
:html=> {:action=>''new'',
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") %>
2006 Mar 09
2
clarify
im learning rails and i got a error while writing a sample code.
Script :
-------
class GuestBookController < ActionController::Base
def index
@entry = GuestBook.find_all
end
def list_parameters
params = request.parameters
render :text=>"Parameters #{params}"
end
def list
params = request.parameters
@entry = GuestBook.new(params[:name])
2009 Nov 27
1
plotting two surfaces simultaneously in a single panel
Hi,
I have recently begun using the lattice package, and have been using
the wireframe command to visualise matrices which are model outputs. I
have been trying to plot two surfaces (from two matrices)
simultaneously in one panel, to visualise intersections etc., but
neither my attempts or trawling the net are helping me find how to do
this.
Can someone help? Thanks
Cheers,
Umesh Srinivasan
2007 Dec 06
3
number_to_currency
I am using the number to currency function because i 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,
2007 Jul 24
2
Nested params and redirect_to
I have a simple client search screen that posts the following params:
Parameters: {"search"=>"Search", "action"=>"list",
"client_search"=>{"first_name"=>"jane", last_name"=>"smith"},
"controller"=>"client"}
This works fine. However I want to redirect to the same
2006 Jul 01
1
Uh oh, Error solving...
undefined method `stringify_keys'' for [["Craved"], ["Whole Sale"]]:Array
I did this earler in the script how come now it''s yealling?
<% catas = Category.find(:all, :order=> "name").map {|u| [u.name]} -%>
<p><label for="item_cata">Catagory:</label><br/>
<%= select ''item'',
2006 Jul 13
1
From the Agile book, page 144 regarding a div tag helper
Hi. in the Rails Agile book here''s what was happening:
>>>
module StoreHelper
def hidden_div_if(condition, attributes = {})
if condition
attributes["style" ] = "display: none"
end
attrs = tag_options(attributes.stringify_keys)
"<div #{attrs}>"
end
# format_price method ...
end
Note that we cheated slightly here. We copied code from the Rails
2006 Apr 01
1
Passing a Record as a Parameter
Consider the following code:
Snippet from my view....
<% for cc in @classified_categories %>
<tr>
<td><%= link_to cc.description, :controller =>''classified_ads'', :action
=> ''list'', :id =>cc %></td>
</tr>
<% end %>
... end snippet
the relevant bit is :id =>cc
Snippet from my controller...
def list
2008 Jul 14
1
question about method "hidden_div_if" in AWDR 2
I followed the sample code in AWDR 2 like this:
store_helper.rb
def hidden_div_if(conditions, attributes = {})
if conditions
attributes["style"] = "display:none"
else
attr = tag_options(attributes.stringify_keys)
"<div #{attr}>"
end
end
store.html.erb
<%= hidden_div_if(@cart.items.empty?, :id => "cart") %>
<%=