Module: Lotus::Action::Mime::ClassMethods
- Defined in:
- lib/lotus/action/mime.rb
Overview
Instance Method Summary collapse
-
#accept(*mime_types) ⇒ Object
protected
Restrict the access to the specified mime type symbols.
Instance Method Details
#accept(*mime_types) ⇒ Object (protected)
Restrict the access to the specified mime type symbols.
60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/lotus/action/mime.rb', line 60 def accept(*mime_types) mime_types = mime_types.map do |mt| ::Rack::Mime.mime_type ".#{ mt }" end before do unless mime_types.find {|mt| accept?(mt) } throw 406 end end end |