Module: ElFinder::ActionClass
- Defined in:
- lib/el_finder/action.rb
Instance Method Summary collapse
Instance Method Details
#el_finder(name = :elfinder, &block) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/el_finder/action.rb', line 11 def el_finder(name = :elfinder, &block) self.send(:define_method, name) do h, r = ElFinder::Connector.new(instance_eval(&block)).run(params) headers.merge!(h) render (r.empty? ? {:nothing => true} : {:text => r.to_json}), :layout => false end end |