Closed maletor closed 12 years ago
Could you elaborate on what effect this defaults hash would have?
Sure.
Rails allows default params to be passed in to routes. Format is a param you can set too. This would mimic that behavior so that /users returns JSON instead of the first responder in responds_to block if no format specified or HTML if neither specified.
On Apr 16, 2012, at 8:26 PM, Brian Ploetz reply@reply.github.com wrote:
Could you elaborate on what effect this defaults hash would have?
Reply to this email directly or view it on GitHub: https://github.com/bploetz/versionist/issues/5#issuecomment-5167652
Ah, gotcha. Will add this in 0.2.0.
I leave up to you to decide if you want to include in versionist. For now I have added this scope within api_version block.
scope :defaults => { :format => :json } do
This is now available on the release-0.2.0 branch if you want to play around with it, and will be in the next release of versionist (0.2.0).
Released in versionist 0.2.0
:+1: looks great.
would be nice.