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:

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: &g

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 &

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 co

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 j

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 t

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,

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'l

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

2012-03-02 Thread Mark Peterson
Though it's less than likely a resource would return with no "id" (or only 1 attribute), I think that it needs to be considered. It's rare to find perfect CRUD. Imagine that User.find(123) was actually CoolViews.find("aggregateOfAllHotTopics"). I guess that the service could supply an "id" of

Re: [Rails-core] Generating new project creates a few files with bad syntax Rails 3.2.1

2012-03-02 Thread Mark Peterson
blem. Is there a mission statement for this mailing list? If there is, I don't see it. On Friday, March 2, 2012 11:47:24 PM UTC-5, SpaceGhost wrote: > > On Fri, Mar 2, 2012 at 11:36 PM, Mark Peterson > wrote: > > On Friday, March 2, 2012 9:25:06 PM UTC-5, thewoo...@gmai

Re: [Rails-core] Generating new project creates a few files with bad syntax Rails 3.2.1

2012-03-02 Thread Mark Peterson
On Friday, March 2, 2012 9:25:06 PM UTC-5, thewoo...@gmail.com wrote: > > "M" is the mute thread shortcut in gmail: > > http://support.google.com/mail/bin/answer.py?hl=en&answer=47787 > > Don't feed the trolls. > > Yes, block your ears as users express their concerns. -- You received this message

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

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
On Friday, March 2, 2012 7:43:35 PM UTC-5, Aaron Patterson wrote: > > > Can you show a code example? > > -- > Aaron Patterson > http://tenderlovemaking.com/ > Sure, I'll create a fresh project to juxtapose the problem this causes with GET and POST on the same model. -- You received this mess

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 Format

Re: [Rails-core] Generating new project creates a few files with bad syntax Rails 3.2.1

2012-03-02 Thread Mark Peterson
On Friday, March 2, 2012 7:19:15 PM UTC-5, Ryan Bigg wrote: > > > On Friday, 2 March 2012 at 4:06 PM, Andrés Mejía wrote: > > I don't mean to offend, but you are one of the most annoying people to > ever write to this list. > > Fire, meet gasoline. > > i.e. This is not the way to deal with peo

Re: [Rails-core] Generating new project creates a few files with bad syntax Rails 3.2.1

2012-03-02 Thread Mark Peterson
On Friday, March 2, 2012 7:09:54 PM UTC-5, eMxyzptlk wrote: > > lool I second that, he's like nil always whining :) > > Sorry dude not offending you, but clearly you woke up on the wrong side of > the bed and decided to take it out on the most respectful list, which > usually people don't even

Re: [Rails-core] Generating new project creates a few files with bad syntax Rails 3.2.1

2012-03-02 Thread Mark Peterson
On Friday, March 2, 2012 7:06:34 PM UTC-5, Andrés Mejía wrote: > > I don't mean to offend, but you are one of the most annoying people to > ever write to this list. > > I'm certainly not offended. Thanks! -- You received this message because you are subscribed to the Google Groups "Ruby on Rai

Re: [Rails-core] Generating new project creates a few files with bad syntax Rails 3.2.1

2012-03-02 Thread Mark Peterson
On Friday, March 2, 2012 5:37:17 PM UTC-5, Mark Peterson wrote: > > On Friday, March 2, 2012 5:25:30 PM UTC-5, Prem Sichanugrist wrote: >> >> Oh, I put the period in the `` because the sentence ended there. Sorry if >> that's confused you. >> >> The co

Re: [Rails-core] Generating new project creates a few files with bad syntax Rails 3.2.1

2012-03-02 Thread Mark Peterson
On Friday, March 2, 2012 5:25:30 PM UTC-5, Prem Sichanugrist wrote: > > Oh, I put the period in the `` because the sentence ended there. Sorry if > that's confused you. > > The correct code is this: > > some_method(name: 'bob', age: 25) > > - Prem > Any programmer worth his salt disobeys the i

Re: [Rails-core] Generating new project creates a few files with bad syntax Rails 3.2.1

2012-03-02 Thread Mark Peterson
On Friday, March 2, 2012 5:14:58 PM UTC-5, Prem Sichanugrist wrote: > > There's a mistyped there in the code. It has to be `name:`, not `name.` > I'm scared does "name." mean something? For all I know it does now :) -- You received this message because you are subscribed to the Google Groups "R

Re: [Rails-core] Generating new project creates a few files with bad syntax Rails 3.2.1

2012-03-02 Thread Mark Peterson
On Friday, March 2, 2012 5:14:16 PM UTC-5, Trek wrote: > > > > > Isn't "name 'bob'" the syntax for passing "bob" as an argument into the > "name" method? Or has that all changed too? > > > > If I saw "name 'bob'", I would think that there's a method named "name" > defined somewhere. > > > > d

Re: [Rails-core] Generating new project creates a few files with bad syntax Rails 3.2.1

2012-03-02 Thread Mark Peterson
On Friday, March 2, 2012 4:21:39 PM UTC-5, eMxyzptlk wrote: > > Just taking a long breath to answer you, this syntax change is not > pointless, it's a preparation for syntax like this: > > some_method(name 'bob', age: 25) > > in some_methods, the arguments is not a *hash* but they are named params

Re: [Rails-core] Generating new project creates a few files with bad syntax Rails 3.2.1

2012-03-02 Thread Mark Peterson
On Friday, March 2, 2012 4:35:22 PM UTC-5, Ryan Bigg wrote: > > > On Friday, 2 March 2012 at 12:15 PM, Mark Peterson wrote: > > You've got to be kidding? Why do these people waste their time with such > pointless syntactical changes > > > This is what would b

Re: [Rails-core] Generating new project creates a few files with bad syntax Rails 3.2.1

2012-03-02 Thread Mark Peterson
On Friday, March 2, 2012 4:21:39 PM UTC-5, eMxyzptlk wrote: > > Just taking a long breath to answer you, this syntax change is not > pointless, it's a preparation for syntax like this: > > some_method(name 'bob', age: 25) > > in some_methods, the arguments is not a *hash* but they are named params

Re: [Rails-core] Generating new project creates a few files with bad syntax Rails 3.2.1

2012-03-02 Thread Mark Peterson
On Friday, March 2, 2012 4:20:50 PM UTC-5, Michael Pavling wrote: > > On 2 March 2012 21:18, Mark Peterson wrote: > > Again, not sure where you got the "rage" from. > > > > I tend to get it from top-posting with no trimming ;-) > So that's what top-pos

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

2012-03-02 Thread Mark Peterson
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) Formats.remove_root(ActiveSupport::JSON.decode(json)) end end end en

Re: [Rails-core] Generating new project creates a few files with bad syntax Rails 3.2.1

2012-03-02 Thread Mark Peterson
th old syntax by using > --old-style-hash. > * That wrap_parameters thing is something else altogether. It's for when > you're calling `@model.to_json`. > > - Prem > > On Mar 2, 2012, at 3:15 PM, Mark Peterson wrote: > > You've got to be kidding? Why do th

Re: [Rails-core] Generating new project creates a few files with bad syntax Rails 3.2.1

2012-03-02 Thread Mark Peterson
Not sure where you got the "rage" from. On Friday, March 2, 2012 3:27:12 PM UTC-5, Michael Koziarski wrote: > > On Saturday, 3 March 2012 at 9:15 AM, Mark Peterson wrote: > > You've got to be kidding? Why do these people waste their time with such > pointless syntac

Re: [Rails-core] Generating new project creates a few files with bad syntax Rails 3.2.1

2012-03-02 Thread Mark Peterson
disable this by setting :format to an empty array. On Friday, March 2, 2012 2:31:18 PM UTC-5, Prem Sichanugrist wrote: > > No, that is Ruby 1.9 hash syntax. It will generate that syntax if you're > using Ruby 1.9. > > - Prem > > On Mar 2, 2012, at 1:31 PM, Mark Pe

[Rails-core] Generating new project creates a few files with bad syntax Rails 3.2.1

2012-03-02 Thread Mark Peterson
session_store.rb is: YourApplicationName::Application.config.session_store :cookie_store, key: '_yourapplicationname_session' should be: YourApplicationName::Application.config.session_store :cookie_store, :key => '_yourapplicationname_session' wrap_parameters.rb is: wrap_parameters format: