There is the remove_root method, is this what you want?

https://github.com/rails/rails/blob/6b4bbb427455ec1af6bdf0896a62129bd3c8c4aa/activeresource/lib/active_resource/formats.rb#L14


2012/10/11 arturo drlt <li...@ruby-forum.com>

> So far I came with a solution for two of this issues:
>
>
> 1) Url using a pluralized name of the object User solved with:
>
>   >>self.collection_name = "user"
>
> 2) Removing the extension from the URL, I solve this adding a Module
> that I found googling around to override some methods of AR.
>
> I thought that I had found the solution for another problem, removing
> the element_name from the json adding:
>
>
>   >>ActiveResource::Base.include_root_in_json = nil
>
> But my json still have this node
>
>  {"user":{"email":"hi'\n"}}
>
> --
> 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@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>


-- 
Fernando Almeida
www.fernandoalmeida.net

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to