Sha256: e9d63d1610ca97813725dec27aa9eab5968bcac6430a910978b1625145dc25b0
Contents?: true
Size: 1.22 KB
Versions: 2
Compression:
Stored size: 1.22 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] # 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
acts_as_api-0.3.4 | lib/acts_as_api/config.rb |
acts_as_api-0.3.3 | lib/acts_as_api/config.rb |