similar to: Beware of HashWithIndifferentAccess#symbolize_keys!

Displaying 20 results from an estimated 4000 matches similar to: "Beware of HashWithIndifferentAccess#symbolize_keys!"

2006 Mar 29
1
Fixing output_compression for Rails 1.1
With Rails 1.1 the output_compression[1] plugin was broken. Once I upgraded to 1.1, I had to tweak it a bit to make it work. Mainly it''s removing the code dealing with component requests, as that''s part of rails now, and changing one function call. Get the modified output_compression.rb file from http://devblog.famundo.com/output_compression.rb and give it a try. It''s
2006 Apr 03
0
Making output_compression work with send_file
While working with the newly fixed output compression plugin, one of the devs in my team discovered that it breaks with send_file(). So if you are using send_file() in your application you must get the fixed file I''ve put at: http://devblog.famundo.com/output_compression.rb. The change is actually in checking for the Content-Disposition header added by send_file(). See the full writeup
2006 May 30
0
Fixing PUT to work with multipart messages
We recently wrote our API to be fully REST, and so user PUT for updates. The problem is, we need multipart requests, but there''s a bug in CGI, and it doesn''t work. The rails code as a fix for POST requests, but not for PUT requests. So we added PUT as well and it works great now. I posted this as a patch in trac (http://dev.rubyonrails.org/ticket/5235) so you can get it if you
2007 Apr 18
3
nil.symbolize_keys -- error with attachment_fu
I''ve spent at least 2 hours on this one problem. On my local machine in my controller I have this: def new @page_title = "New User" @user = User.new @photo = Photo.new end All is good. Now, on the remote server I get an error when accessing the ''new'' view. If I remove @photo = Photo.new from the controller then the error goes away. This same error
2012 Jun 01
3
Serialized attribute saved as HashWithIndifferentAccess in database
My Booking model has: serialize :custom_data, Hash From the console it works as expected saving values 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: ---
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
2009 Jul 29
1
Windows+Apache+FastCGI+Postgres - didn't work
Hello All, Get [Thu Jul 30 03:46:12 2009] [error] [client 66.249.67.10] (OS 2) Can''t find specified file: FastCGI: failed to connect to server "C:/usr/www/ public/dispatch.fcgi": CreateFile()/WaitNamedPipe() timed out [Thu Jul 30 03:46:12 2009] [error] [client 66.249.67.10] FastCGI: incomplete headers (0 bytes) received from server "C:/usr/www/public/ dispatch.fgi"
2006 Mar 05
5
A nicer and gentler form of spawner
I was working on deploying an app with switchtower, and I really dislike the way spawner is implemented. The way it will relaunch the dispatcher all the time just to let it die if the port is in use is too brute force for my taste. As we''re in a ruby script, why not let ruby find out if the port is in use? Using the TCPServer class we can try and bing to the port. If we succeed, it means
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@public.gmane.org To unsubscribe from this group, send
2011 Mar 04
4
!map:HashWithIndifferentAccess
Hi All, I have an extremely frustrating problem 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"
2006 Jan 31
3
Lost in routing
I''m trying to create a modules based system where my controllers are all under modules. So the structure looks something like: app/ controllers/ message/ news_controller.rb email_controller.rb library books_controller.rb pictures_controller.rb home_page_controller.rb Each of those controller has
2007 May 01
0
[Fwd: Re: [R-downunder] Beware unclass(factor)] (PR#9641)
It really is unclear what is claimed to be a bug here. But see https://stat.ethz.ch/pipermail/r-devel/2007-May/045592.html for why the bug is not in R: your old and new data do not match. Your fit is to a category. [The problem with the web interface to R-bugs was reported last week: it is being worked on.] On Mon, 30 Apr 2007, r.darnell at uq.edu.au wrote: > This is a multi-part
2014 Mar 02
2
[LLVMdev] [RFC] C++11: beware unnecessary copies with auto
It’s easy to copy unintentionally when using ‘auto’, particularly inside range-based for loops. My experience is that defaulting to const& makes code easier to get right (and easier to read). Anyone see an issue with the attached patch to the coding standards? -------------- next part -------------- A non-text attachment was scrubbed... Name: beware-copies-with-auto.patch Type:
2001 Nov 06
0
beware of sapply(x, data.class) == "numeric"
This is just a warning/hint to others; package/function writers in particular : The `cluster' package (originally S-plus from Rousseeuw et al) currently has code such as ## check type of input matrix if((!is.data.frame(x) && !is.numeric(x)) || !all(sapply(x, data.class) == "numeric")) stop("x is not a numeric dataframe or matrix.") x <-
2012 May 17
2
BEWARE: This list is being harvested for leads
I personally didn't mind a one-time notice from the dev's team that that are now offering paid commercial support. What if I WANTED it? I felt like it was a courtesy email from them to let me know that it's available. If those emails continue unsolicited, then it may start to feel like spam to me, but this did not. In general, I've actually been looking for ways to financially
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
2006 Oct 16
3
Saving many_to_many
Ahoy, i''m trying to save a many to many between "talent" and "vital stat" talent_controller.rb def edit @talent = Talent.find(params[:id], :include => [:talent_type, :vital_stats]) @talent_types = TalentType.find_all @vital_stats = VitalStat.find_all if request.post? @talent.attributes = params[:talent] @talent.attributes =
2008 Apr 19
3
How to find nil object error in the rails application?
After I added some plugins to rails my application it begin to give following error. Error during failsafe response: You have a nil object when you didn''t expect it! The error occurred while evaluating nil.symbolize_keys (originally You have a nil object when you didn''t expect it! The error occurred while evaluating nil.symbolize_keys) But there is no stack trace I dont
2008 Jan 21
1
specin'' update_attributes! + Hash
Hi, I am facing a problem while trying to test a method that updates an attribute. The attribute format should be converted to YAML format before storing in the table which is excatly what is going on. But when testing it using expectations in rspec it returns an error. *** below is the error message : Spec::Mocks::MockExpectationError in ''InteractController (submit) - saving a form to
2006 Jan 07
11
Beware of Mozilla + Rails
Hi all, In re-doing the very first Hello World in the Agile Rails WEb Dev book, I continuously got blank pages, no matter what URL I put in, except when I put http://localhost:3000/ After eliminating everything else, I switched from Mozilla to Konqueror, and the symptom went away. I tried clearing cache on Mozilla, but that didn''t bring it back. I copied and pasted the URL from