Re: [Rails-core] ActiveResource 3.2.1 : ActiveResource::Formats::JsonFormat.decode and ActiveResource::Base.include_root_in_json

2012-03-04 Thread Rodrigo Rosenfeld Rosas
Em 03-03-2012 13:47, Mark Peterson escreveu: On Saturday, March 3, 2012 11:42:17 AM UTC-5, kristian wrote: On Sat, Mar 3, 2012 at 9:44 PM, Rodrigo Rosenfeld Rosas --- class User ActiveResource::Base self.site = http://localhost:9000 http://localhost:9000 end

Re: [Rails-core] ActiveResource 3.2.1 : ActiveResource::Formats::JsonFormat.decode and ActiveResource::Base.include_root_in_json

2012-03-04 Thread Mark Peterson
On Sunday, March 4, 2012 11:08:54 AM UTC-5, Rodrigo Rosenfeld Rosas wrote: Em 03-03-2012 13:47, Mark Peterson escreveu: On Saturday, March 3, 2012 11:42:17 AM UTC-5, kristian wrote: On Sat, Mar 3, 2012 at 9:44 PM, Rodrigo Rosenfeld Rosas --- class User ActiveResource::Base

Re: [Rails-core] ActiveResource 3.2.1 : ActiveResource::Formats::JsonFormat.decode and ActiveResource::Base.include_root_in_json

2012-03-04 Thread Rodrigo Rosenfeld Rosas
Em 04-03-2012 14:40, Mark Peterson escreveu: On Sunday, March 4, 2012 11:08:54 AM UTC-5, Rodrigo Rosenfeld Rosas wrote: Em 03-03-2012 13:47, Mark Peterson escreveu: On Saturday, March 3, 2012 11:42:17 AM UTC-5, kristian wrote: On Sat, Mar 3, 2012 at 9:44 PM, Rodrigo

Re: [Rails-core] ActiveResource 3.2.1 : ActiveResource::Formats::JsonFormat.decode and ActiveResource::Base.include_root_in_json

2012-03-04 Thread Mark Peterson
On Sunday, March 4, 2012 3:33:31 PM UTC-5, Rodrigo Rosenfeld Rosas wrote: Em 04-03-2012 14:40, Mark Peterson escreveu: On Sunday, March 4, 2012 11:08:54 AM UTC-5, Rodrigo Rosenfeld Rosas wrote: Em 03-03-2012 13:47, Mark Peterson escreveu: On Saturday, March 3, 2012 11:42:17 AM

Re: [Rails-core] ActiveResource 3.2.1 : ActiveResource::Formats::JsonFormat.decode and ActiveResource::Base.include_root_in_json

2012-03-04 Thread Rodrigo Rosenfeld Rosas
Em 04-03-2012 18:52, Mark Peterson escreveu: On Sunday, March 4, 2012 3:33:31 PM UTC-5, Rodrigo Rosenfeld Rosas wrote: Em 04-03-2012 14:40, Mark Peterson escreveu: On Sunday, March 4, 2012 11:08:54 AM UTC-5, Rodrigo Rosenfeld Rosas wrote: Em 03-03-2012 13:47, Mark

Re: [Rails-core] ActiveResource 3.2.1 : ActiveResource::Formats::JsonFormat.decode and ActiveResource::Base.include_root_in_json

2012-03-04 Thread Mark Peterson
On Sunday, March 4, 2012 7:59:34 PM UTC-5, Rodrigo Rosenfeld Rosas wrote: Em 04-03-2012 18:52, Mark Peterson escreveu: On Sunday, March 4, 2012 3:33:31 PM UTC-5, Rodrigo Rosenfeld Rosas wrote: Em 04-03-2012 14:40, Mark Peterson escreveu: On Sunday, March 4, 2012 11:08:54 AM

Re: [Rails-core] ActiveResource 3.2.1 : ActiveResource::Formats::JsonFormat.decode and ActiveResource::Base.include_root_in_json

2012-03-03 Thread Rodrigo Rosenfeld Rosas
Given the code below, it seems you're just starting using Rails and you still don't understand Rails basic concepts. Shouldn't you consider posting in the user's mailing list first? It's more likely that you'll get better advices there than here... After you get used to Rails, if you still

Re: [Rails-core] ActiveResource 3.2.1 : ActiveResource::Formats::JsonFormat.decode and ActiveResource::Base.include_root_in_json

2012-03-03 Thread Dheeraj Kumar
Rodrigo has made a very important point about which list to use. How do to X with rails - rubyonrails-talk How rails does X - rails-core On 3/3/12, Rodrigo Rosenfeld Rosas rr.ro...@gmail.com wrote: Given the code below, it seems you're just starting using Rails and you still don't understand

Re: [Rails-core] ActiveResource 3.2.1 : ActiveResource::Formats::JsonFormat.decode and ActiveResource::Base.include_root_in_json

2012-03-03 Thread Mark Peterson
On Saturday, March 3, 2012 9:23:16 AM UTC-5, Rodrigo Rosenfeld Rosas wrote: Given the code below, it seems you're just starting using Rails and you still don't understand Rails basic concepts. Shouldn't you consider posting in the user's mailing list first? It's more likely that you'll get

Re: [Rails-core] ActiveResource 3.2.1 : ActiveResource::Formats::JsonFormat.decode and ActiveResource::Base.include_root_in_json

2012-03-03 Thread Matt Jones
On Mar 2, 2012, at 10:17 PM, Mark Peterson wrote: ### Scenario 2 using remove_root in decode, user.json does not have id ### def decode(json) Formats.remove_root(ActiveSupport::JSON.decode(json)) end GET /users/123.json

Re: [Rails-core] ActiveResource 3.2.1 : ActiveResource::Formats::JsonFormat.decode and ActiveResource::Base.include_root_in_json

2012-03-03 Thread Mark Peterson
On Saturday, March 3, 2012 9:27:58 AM UTC-5, Dheeraj Kumar wrote: Rodrigo has made a very important point about which list to use. How do to X with rails - rubyonrails-talk How rails does X - rails-core I'm pointing out something that changed, and would break my project if I upgrade, in

Re: [Rails-core] ActiveResource 3.2.1 : ActiveResource::Formats::JsonFormat.decode and ActiveResource::Base.include_root_in_json

2012-03-03 Thread Mark Peterson
On Saturday, March 3, 2012 10:47:09 AM UTC-5, Matt jones wrote: This looks to be a variant of issue #2692: https://github.com/rails/rails/pull/2692 although the patch in that instance wouldn't fix this bug, as the detection heuristic will guess that image_page is a root element to be

Re: [Rails-core] ActiveResource 3.2.1 : ActiveResource::Formats::JsonFormat.decode and ActiveResource::Base.include_root_in_json

2012-03-03 Thread Rodrigo Rosenfeld Rosas
Em 03-03-2012 12:41, Mark Peterson escreveu: On Saturday, March 3, 2012 9:23:16 AM UTC-5, Rodrigo Rosenfeld Rosas wrote: Given the code below, it seems you're just starting using Rails and you still don't understand Rails basic concepts. Shouldn't you consider posting in the

Re: [Rails-core] ActiveResource 3.2.1 : ActiveResource::Formats::JsonFormat.decode and ActiveResource::Base.include_root_in_json

2012-03-03 Thread Mark Peterson
On Saturday, March 3, 2012 11:14:08 AM UTC-5, Rodrigo Rosenfeld Rosas wrote: Em 03-03-2012 12:41, Mark Peterson escreveu: On Saturday, March 3, 2012 9:23:16 AM UTC-5, Rodrigo Rosenfeld Rosas wrote: Given the code below, it seems you're just starting using Rails and you still don't

Re: [Rails-core] ActiveResource 3.2.1 : ActiveResource::Formats::JsonFormat.decode and ActiveResource::Base.include_root_in_json

2012-03-03 Thread kristian
On Sat, Mar 3, 2012 at 9:44 PM, Rodrigo Rosenfeld Rosas --- class User  ActiveResource::Base   self.site = http://localhost:9000; end --- I don't call this lack of syntactic sugar. This is completely wrong Ruby code and makes me feel that you don't know Ruby enough. Please, post the

Re: [Rails-core] ActiveResource 3.2.1 : ActiveResource::Formats::JsonFormat.decode and ActiveResource::Base.include_root_in_json

2012-03-03 Thread Mark Peterson
On Saturday, March 3, 2012 11:42:17 AM UTC-5, kristian wrote: On Sat, Mar 3, 2012 at 9:44 PM, Rodrigo Rosenfeld Rosas --- class User ActiveResource::Base self.site = http://localhost:9000; end --- I don't call this lack of syntactic sugar. This is completely wrong Ruby

Re: [Rails-core] ActiveResource 3.2.1 : ActiveResource::Formats::JsonFormat.decode and ActiveResource::Base.include_root_in_json

2012-03-02 Thread Aaron Patterson
On Fri, Mar 02, 2012 at 01:26:18PM -0800, Mark Peterson wrote: So ActiveResource::Base.include_root_in_json is no longer supported, and then I encounter the following within Json Formats: module ActiveResource module Formats module JsonFormat def decode(json)

Re: [Rails-core] ActiveResource 3.2.1 : ActiveResource::Formats::JsonFormat.decode and ActiveResource::Base.include_root_in_json

2012-03-02 Thread Mark Peterson
On Friday, March 2, 2012 7:25:34 PM UTC-5, Aaron Patterson wrote: On Fri, Mar 02, 2012 at 01:26:18PM -0800, Mark Peterson wrote: So ActiveResource::Base.include_root_in_json is no longer supported, and then I encounter the following within Json Formats: module ActiveResource

Re: [Rails-core] ActiveResource 3.2.1 : ActiveResource::Formats::JsonFormat.decode and ActiveResource::Base.include_root_in_json

2012-03-02 Thread Aaron Patterson
On Fri, Mar 02, 2012 at 04:38:06PM -0800, Mark Peterson wrote: On Friday, March 2, 2012 7:25:34 PM UTC-5, Aaron Patterson wrote: On Fri, Mar 02, 2012 at 01:26:18PM -0800, Mark Peterson wrote: So ActiveResource::Base.include_root_in_json is no longer supported, and then I encounter the

Re: [Rails-core] ActiveResource 3.2.1 : ActiveResource::Formats::JsonFormat.decode and ActiveResource::Base.include_root_in_json

2012-03-02 Thread Aaron Patterson
On Fri, Mar 02, 2012 at 04:47:05PM -0800, Mark Peterson wrote: On Friday, March 2, 2012 7:43:35 PM UTC-5, Aaron Patterson wrote: Can you show a code example? Sure, I'll create a fresh project to juxtapose the problem this causes with GET and POST on the same model. Cool, thanks! --

Re: [Rails-core] ActiveResource 3.2.1 : ActiveResource::Formats::JsonFormat.decode and ActiveResource::Base.include_root_in_json

2012-03-02 Thread Mark Peterson
Took longer than I thought to get a basic use case that fails. Scenario 2 below is the failure: My Code: class User ActiveResource::Base self.site = http://localhost:9000; end class Image ActiveResource::Base end class ImagePage ActiveResource::Base self.element_name = image_page

Re: [Rails-core] ActiveResource 3.2.1 : ActiveResource::Formats::JsonFormat.decode and ActiveResource::Base.include_root_in_json

2012-03-02 Thread Mark Peterson
And I should add, though it was difficult to get myself into this fail case, It was amazingly quick to set up 2 codebases and servers to perform this task. Great work people! :) -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Core group. To view