Sometimes to_json options feels abusing to me:

user.to_json(:only => [:id, :name], :methods => [:something])


I would prefer an API like this instead:

user.to_json(:id, :name, :something)

What do you think about adding a use case like this to to_json?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-core/-/DKH-jVEVlnQJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to