similar to: serializable_hash and serializable_add_includes

Displaying 20 results from an estimated 3000 matches similar to: "serializable_hash and serializable_add_includes"

2011 Jul 14
1
rails 3.0.9 ArgumentError (redundant UTF-8 sequence):
Hi guys, I have a simple controller def gmap @intentsearches = Intentsearch.all logger.info @intentsearches respond_to do |format| format.html {render :gmap} format.xml {render :xml => @intentsearches } format.json { render :json => @intentsearches } end end and want a json response, but i do get the following error Completed 500 Internal
2012 Jan 17
4
Find all association methods
Hi all, I want to get all association methods in one single model.... Any default method is provided by Active Record ??? i am using ruby 1.9.3 and rails 3.1.3 Please reply me .... Thanks, kingston.s -- 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
2012 Sep 25
3
Proposal for a new ActiveModel::Errors structure
There are few issues with the current ActiveModel::Errors class. Firstly, when an error is added to ActiveModel::Errors class via #add method (https://github.com/rails/rails/blob/master/activemodel/lib/active_model/errors.rb#L294) its translation is added. It should not be translated when being added, but only when being read. The second issue is a bit bigger. We''d like to create
2013 May 22
2
Creating nested hash from nested active record results
Hello, I''m trying to find a very abstract and "one size fits all" for converting nested active record results to nested hashes. It''s easy, to do one level deep as such: [code] results_to_hash = Hash[ found_categories.map{ |c| [c.id, c.title]}] [/code] But, when I try to add another collection to the mix, it completely borks and the results_to_hash only returns an
2012 Jan 15
2
DEPRECATION WARNING: Passing a template handler in the template name is deprecated. (rspec + haml)
I upgraded a small project that I had created on 3.1.3 to 3.2.0.rc2. Running rspec on it brings about a large amount of these messages: DEPRECATION WARNING: Passing a template handler in the template name is deprecated. You can simply remove the handler name or pass render :handlers => [:haml] instead. (called from block (2 levels) in <top (required)> at
2007 Oct 04
4
2 more JSON / XML feature parity patches before Rails 2.0
I''d really like to see just 2 more functional changes to the JSON serialization/encoding before we get to Rails 2.0. First, and I think this is really crucial because without it all the efforts to output JSON from ActiveRecord objects would have been half in vain, is to allow us to do this in controllers: @authors = Author.find(:all) render :json => @authors.to_json(:only =>
2010 Apr 05
2
Harmonizing JSON/XML serialization
The way Rails handles root nodes in JSON and XML serialization is inconsistent. This has been discussed before: https://rails.lighthouseapp.com/projects/8994/tickets/2584-232-activeresource-json-doesnt-send-parameters-with-root-node This seems mostly taken care of with ActiveModel::Base.include_root_in_json, especially if/when it ends up in ActiveResource. However, there is also the issue of how
2012 Jan 21
16
Installing rails on Ubuntu
Hello, I''m trying to install the rails on ubuntu 11.10, but when I put the command felipe@Felipe:~/Downloads/rubygems-1.8.15$ sudo gem install rails --no-r1 --no-rdoc ERROR: Loading command: install (LoadError) no such file to load -- zlib ERROR: While executing gem ... (NameError) uninitialized constant Gem::Commands::InstallCommand felipe@Felipe:~/Downloads/rubygems-1.8.15$
2007 Dec 27
5
Rails 2.02 dropped JSON attribute tag ?
Hey there I was scratching my head over why my application breaks when I run on a local server but works on my remote server. It turns out that my local server is Rails 2.0.2 and my remote server is 1.2.3 and I expect the tag "attributes" to be passed with a json stream, before parsing. Unfortunately, this was dropped in 2.0.2. Is there any documentation on this? Any way to get it back?
2012 Jan 05
2
Error while rake actions
rake aborted! /home/Mahesh/uma/myapp/Rakefile:6: unterminated string meets end of file /usr/local/lib/ruby/1.9.1/rake.rb:2373:in `load'' /usr/local/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'' /usr/local/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'' /usr/local/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling''
2006 May 27
5
ActiveSupport JSON working?
Hi, I am trying to convert a hash to JSON using ActiveSupports built in .to_json. I am doing similar to the example below but are there certain strings that could go in place of ''bar'' or ''rez'' that will break the to_json method? I am using a very long string from rjs output in place of ''bar''. Perhaps .to_json is not ready yet? Thanks, Peter
2012 Feb 18
6
rake db:reset doesn't work, fails with unknown attribute: user_status
If I manually drop the database, and run create, then migrate it works fine. But doing a: rake db:reset it fails with: unknown attribute: user_status Does this mean my migrations are not dropping things correctly? -- 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
2010 Jul 14
3
`stack level too deep` when overwriting `to_json`
I''m using [acts_as_commentable_with_threading](http://github.com/elight/acts_as_commentable_with_threading/), and it worked fine until I tried to overwrite the to_json function to include more details about the associated user. Here''s part of the comment class (which was originally defined in the plugin, but I moved it to the models folder, a move which seems not to affect the
2012 Feb 12
3
Rails routes - destroy
Can''t figure out how duplicate routes are differentiated by rails ... Read routing from inside out and API as well as a few tutorials but still don''t get it!!! For example... routes.rb resources :minisections do resources :questions end rake routes: minisection_question GET /minisections/:minisection_id/questions/:id(.:format) questions#show
2007 Mar 28
7
Rails, REST and JSON
Hi everyone, I''m writing a lightweight AJAX application using Rails on the server side as a RESTful web service provider. I need the web service to support both JSON and XML I/O. Outputting data in XML and JSON is easy (using to_xml and to_json), and it''s also easy to do XML input as Rails does it for you automatically. Is it possible to somehow have the same automatic parsing
2006 Feb 10
7
convert rails object to javascript variables
Am i a total idiot to try and parse out a rails object for javascript in this way? <% for i in interface_items[0].attributes %> var <%= i[0] %> = "<%=h( i[1] )%>" <% end %> Am I missing something really obvious? Thanks, Mark -- -------------------------------------------------------------------- I am Mark Daggett and I approve this message.
2013 Mar 14
7
No Migration Files are created
I''ve been working with Rails for 3 Months now, but haven''t experienced this problem until now. I''m currently working through Micharl Hartls Tutorial and everything worked fine so far, but suddenly (chapter 11) I can nolonger create Migration Files. when entering "rails g model Name field1:type" I don''t get the usual "create db/migrate...."
2011 Jun 11
15
after initialize blowing up---help
All, Can anyone see what''s happening here? ================== migration ======================= class CreateGreetings < ActiveRecord::Migration def self.up create_table :greetings do |t| t.string :greet t.string :language t.integer :count t.timestamps end end def self.down drop_table :greetings end end ================== greeting.rb
2011 Jan 06
4
Not able to insert value in rails console
I am using authlogic for authentication in rails 3.0.3 with ruby 1.9.2 Using activerecord-sqlserver-adapter (3.0.5) windows with sqlserver database when i create user details in rails console, i am getting below error, >User.create(:login=>''test'',:password=>''test123'',:password_confirmation=>''test123'')
2011 Feb 03
5
Ignore attr_accessible in seed file
Is there a way to tell Rails to ignore attr_accessible when seeding the database and to allow mass assignment with create or new? I know how to skip validations but do not find anything on mass assignment... -- 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