Module: Exposure::Configuration::Options
- Defined in:
- lib/exposure/options.rb
Instance Method Summary collapse
Instance Method Details
#allow_actions! ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/exposure/options.rb', line 4 def allow_actions! if [:only] [:except] = Patterns::Resources::DefaultActions - [:only] end if [:except] [:except].each do |action| undef_method(action) end end end |
#allow_formats! ⇒ Object
16 17 18 |
# File 'lib/exposure/options.rb', line 16 def allow_formats! formats = [:formats] || [:html, :xml] end |
#name! ⇒ Object
20 21 22 23 |
# File 'lib/exposure/options.rb', line 20 def name! self.resource_name = @_exposed_resource_name.to_s.singularize self.resources_name = @_exposed_resource_name.to_s end |