Displaying 20 results from an estimated 51 matches for "hashwithindifferentaccess".
2012 Jun 01
3
Serialized attribute saved as HashWithIndifferentAccess in database
...ues to the custom_data
attribute.
But when having a form with parameters like
this: booking[custom_data][hello] and creating a new object in the
controller like this: Booking.new( params[:booking] ), values are saved in
the database with added metadata like this: ---
!ruby/hash:ActiveSupport::HashWithIndifferentAccess
How can get rid of the HashWithIndifferentAccess-metadata when saving from
a form?
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/1WO6...
2005 May 12
26
performance update
I have made additional progress with regard to performance. My latest data:
configuration 1: r121.latest
configuration 2: r121p.latest
page c1 real c2 real c1 r/s c2 r/s c1/c2
/empty/index 6.75525 1.71983 148.0 581.5 3.93
/welcome/index 6.89044 1.89244 145.1 528.4 3.64
/rezept/index 4.99573
2006 May 14
0
Beware of HashWithIndifferentAccess#symbolize_keys!
Hi,
I just posted a patch tot he rails trac for a bug we found where
running symbolize_keys! on a HashWithIndifferentAccess will delete all
items from the hash. Please make sure you either never call
symbolize_keys! (or to_options! which just alias it) on a
HashWithIndifferentAccess, or apply the path attached from the ticket
at: http://dev.rubyonrails.org/ticket/5076
I also posted a much longer explanation in my blog...
2005 Dec 03
1
typecasting HashWithIndifferentAccess
I want to typecast an object of HashWithIndifferentAccess (params) to Hash.
Whats the way of doing this (except each?)
Thanks in advance.
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails
2010 Aug 23
7
Sharing sessions between a rails3 app and a rails2 app. Rails 2 app crashes.
...able and a cookie variable on
the first app (myapp.com) and then read them on the second app
(myapp.com/foo).
It only works the first time though. If I go back to myapp.com and
then revisit myapp.com/foo the rails2 application crashes with the
error NameError (uninitialized constant
ActiveSupport::HashWithIndifferentAccess):
This error is raised when any attempt to access the session variable is made.
I first thought it was because rails3 set a session[''session_id''] and
rails2 set a session[:session_id] so wrote some code to delete
session[''session_id''] but that didn''t s...
2006 Oct 16
3
Saving many_to_many
...#39;''') %>
<% end %>
<div class="cleaner"></div>
</fieldset>
My problem is that the talent isn''t being updated w/ the checked or
unchecked fields. The returned PARAMS could look like this:
commit: Save
action: edit
talent: !map:HashWithIndifferentAccess
title: Casting Director
id: "2"
talent_type: !map:HashWithIndifferentAccess
talent_type_id: "1"
controller: talent
vital_stat: !map:HashWithIndifferentAccess
"2": "0"
"3": "0"
"4": "1"
which means there are t...
2010 Sep 21
6
Iterate HashWithIndifferentAccess
How do I iterate a HashWithIndifferentAccess? I need to set the order
using a sortable_element.
--
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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@...
2006 Feb 02
8
How to get all selected rows in the mutli-selection listbox?
...ated the listbox with the following function:
select_tag("form__list1",
options_for_select(["A","B","C","D"], selected = "A"),
html_options = {"size" => 5, "multiple" => true})
What I get from params is :
!map:HashWithIndifferentAccess
commit: Next
action: index
controller: cellfiles
form__list1: "A"
Thanks you very much
Saiho
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
2007 Sep 25
16
putting away HashWithIndifferentAccess
Hey, campineros. And many good handshakes to zimbatm for getting
some patches applied.
So, yeah, I''d really like to get rid of any serious dependancies with
this 1.6 release. Anything that''s not in stdlib has to go. Of course,
camping-omnibus will still assume the whole ActiveRecord, Markaby,
Mongrel setup that''s in the history books.
Metaid can be removed and
2011 Mar 04
4
!map:HashWithIndifferentAccess
...and I kind of think this is an
error in rails, but you never know.
I have a hash of objects that I am iterating through in order to display
the needed info. As I am doing that and displaying half a dozen values,
one value is being interrupted by rails as a hash and giving me this
error:
--- !map:HashWithIndifferentAccess comm: "1" comm_percentage: "12"
hotel_name: "111947" rate: "2.00" additional_email_1: "" amenities: cccc
neg_by: Client comm_dollar_amt: "34.00" hod: test rac: xxx billing: "0"
I understand what the messages says, it thinks I am...
2006 Jul 08
2
Creating/Saving dependent objects
...d575362f79c9c9'', ''2006-07-07 23:29:09'', ''
302121320.0514656016603112'', ''rohant'', '''', '''', 0, 0, 0, ''2006-06-11
01:39:18'')*
The output from debug(params) is as below.
--- !ruby/hash:HashWithIndifferentAccess
user: !ruby/hash:HashWithIndifferentAccess
password_confirmation: rohant
username: rohant
password: rohant
commit: Add User
action: add_user
controller: user
address: !ruby/hash:HashWithIndifferentAccess
city: San Jose
zip: "95125"
street: 7777 Pitkin Ct
Clearly I am missing...
2006 May 24
3
Real life use of multiple linked models in the same view
...s a patch at http://dev.rubyonrails.org/ticket/2053 but nobody seamns to give it some credit. It''s 9 month old!!
The parameters are putted in a nested hash. The question is why the above code doesn''t work on submission of the form.
The error reported is "Phone expected, got HashWithIndifferentAccess"
Parameters: {"commit"=>"Edit", "id"=>"1", "contact"=>{"office_phone"=>{"text"=>"123"}, "name"=>"same name"}}
I''m looking for a beautiful solution with some magic in...
2007 Oct 15
2
Something is wrong with Camping::H in the svn version
Dear All,
I got az error message with the svn version of Camping under FastCGI
NoMethodError undefined method `user_id'' for
{"user_id"=>2}:HashWithIndifferentAccess:
The call was a simple "User.find @state.user_id" in my login
controller... The following libraries are loaded manually:
action_controller, action_view, mime/types, camping, camping/mab,
camping/db, redcloth, erubis, htmlentities. With the old gem version and
running on localhost wit...
2008 Jan 21
1
specin'' update_attributes! + Hash
...s the error message :
Spec::Mocks::MockExpectationError in ''InteractController (submit) -
saving a form to use later should update costumer details using the form
params''
Mock ''Instance_1039'' expected :update_attributes with
({:customer_details=>"--- !map:HashWithIndifferentAccess \\ntitle:
Hola\\n"}) but received it with ({:customer_details=>"---
!map:HashWithIndifferentAccess \ntitle: Hola\n"})
C:/webapps/interact/branches/interact_new_features/app/controllers/interact_controller.rb:74:in
`submit''
./spec/controllers/interact_controller_spec.rb:20...
2006 Jun 13
17
reconstituting a date
In my view code, I have <%= datetime_select "in_out", "time_in" %>
which returns in params
:in_out: !map:HashWithIndifferentAccess
time_in(1i): "2006"
time_in(2i): "6"
time_in(3i): "12"
time_in(4i): "20"
time_in(5i): "24"
and I want to save that datetime to a column in the db...
if params[:user][:in_out] == "In"
@in_out.time_in = para...
2006 Mar 02
3
merge with symbol problem
Hi,
It''s a little bit annoying to me, I can''t understand the following:
If I merge a value to the params hash with:
params => params.merge :value => new_value
the params[:value] doesn''t change, but if I use string instead of a
symbol like:
params => params.merge "value" => new_value
it works.
Somebody plz tell me why...
Abbath
2006 Apr 10
4
has render_component changed?
I have an application that worked fine, but after the recent updates
has broken in some calls to render_component from views. I might be
missing something but as far as I remember Rails updates is the only
thing I''ve done in between. See the log:
*** START LOG SNIPPET
Start rendering component ({:params=>
{:center_id=>10, :id=>25},
2006 Apr 01
12
Repost: Why is rails generating bad SQL?
...----------------------
Looking for Parent= ff2d7022-be0a-11da-9f01-00400506faf5
Initial request = nil
SQL Conditions = ''nil''
Have one ID to check: ff2d7022-be0a-11da-9f01-00400506faf5
find all - finder_sql= SELECT FIRST 1 * FROM quizzes WHERE (quizzes.id
= ''--- !map:HashWithIndifferentAccess
ff2d7022-be0a-11da-9f01-00400506faf5: ""
'')
I instrumented ActiveRecord.find
2006 Apr 04
3
Mongrel Web Server 0.3.12.1 -- Iron Mongrel
Hello All Mongrel Users,
For the unintiated, Mongrel is a web server that runs Ruby web applications
really fast. Read http://mongrel.rubyforge.org/ to get find out more about
it.
This is the Iron Mongrel release. It is the result of trying to trash
Mongrel until it can''t move and then fixing anything that comes up. The
work was done on EastMedia''s and VeriSign''s
2007 Jan 08
2
ActiveSupport Dependency
Hi, Just wondering if ActiveSupport is actually used heavily by
Camping when ActiveRecord is not used? I see ActiveSupport is a
dependency of ActiveRecord, but Camping still wants it even when
ActiveRecord isn''t used.