Sha256: 018baabae777bd54bf2fc2f30b6bd9e3b9da4e30dca03b499703bc4a737bbae8
Contents?: true
Size: 1.44 KB
Versions: 3
Compression:
Stored size: 1.44 KB
Contents
module ActsAsApi module Config class << self # The accepted response formats # Default is <tt>[:xml, :json]</tt> attr_accessor_with_default :accepted_api_formats, [:xml, :json] # :nodoc: # Holds formats that should be dasherized # Default is <tt>[:xml]</tt> attr_accessor_with_default :dasherize_for, [:xml] # If true, the root node in json collections will be added # so the response will look like the default Rails 3 json # response attr_accessor_with_default :include_root_in_json_collections, false # Holds references to formats that need # to get added an additional root node # with the name of the model. attr_accessor_with_default :add_root_node_for, [:json] # The default name of a root node of a response # if no root paramter is passed in render_for_api # and the gem is not able to determine a root name # automatically attr_accessor_with_default :default_root, :record # If true a json response will be automatically wrapped into # a JavaScript function call in case a :callback param is passed. attr_accessor_with_default :allow_jsonp_callback, false # If true the jsonp function call will get the http status passed # as a second parameter attr_accessor_with_default :add_http_status_to_jsonp_response, true end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
acts_as_api-0.3.7 | lib/acts_as_api/config.rb |
acts_as_api-0.3.6 | lib/acts_as_api/config.rb |
acts_as_api-0.3.5 | lib/acts_as_api/config.rb |