Created
January 12, 2010 20:56
-
-
Save dwillis/275607 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def votes_date_range | |
return unless check_format | |
@version = params[:version] | |
@format = params[:format] | |
raise ActiveResource::BadRequest.new("Not available in this version") if @version == 'v2' | |
.... | |
end | |
def bad_request(e) | |
@message = e.message | |
respond_to do |format| | |
format.xml { render :file => "svc/400.xml", :status => 400, :content_type => 'application/xml' } | |
format.json { render :file => "svc/400.json", :status => 400, :content_type => 'application/json' } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment