Module: Charcoal::JSONP::ClassMethods
- Includes:
- ControllerFilter
- Defined in:
- lib/charcoal/jsonp.rb
Instance Method Summary collapse
Methods included from ControllerFilter
Instance Method Details
#jsonp_allowed ⇒ Object
17 18 19 |
# File 'lib/charcoal/jsonp.rb', line 17 def jsonp_allowed @jsonp_allowed ||= Hash.new(lambda { |_| false }) end |
#jsonp_allowed?(instance, action) ⇒ Boolean
25 26 27 28 |
# File 'lib/charcoal/jsonp.rb', line 25 def jsonp_allowed?(instance, action) jsonp_allowed[action.to_sym].try(:call, instance) || (action != :all && jsonp_allowed?(instance, :all)) end |