Module: ExtJS::Controller::ClassMethods
- Defined in:
- lib/action_controller/controller.rb
Overview
Controller class methods
Instance Method Summary collapse
- #extjs_message_property(value = nil) ⇒ Object
- #extjs_proxy(params) ⇒ Object
- #extjs_reader(model) ⇒ Object
- #extjs_root(value = nil) ⇒ Object
- #extjs_success_property(value = nil) ⇒ Object
Instance Method Details
#extjs_message_property(value = nil) ⇒ Object
49 50 51 52 |
# File 'lib/action_controller/controller.rb', line 49 def (value=nil) ExtJS::MVC. = value unless value.nil? ExtJS::MVC. end |
#extjs_proxy(params) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/action_controller/controller.rb', line 20 def extjs_proxy(params) proxy = {} if params[:proxy] === 'direct' actions = ['create', 'read', 'update', 'destroy'] proxy["api"] = {} direct_actions.each_index do |n| proxy["api"][actions[n]] = direct_actions[n][:name] end else if params[:config]["api"] proxy["api"] = {} params[:config]["api"].each {|k,v| proxy["api"][k] = "/#{params[:controller]}/#{v}" } else proxy["url"] = "/#{params[:controller]}.#{params[:format].to_s}" end end proxy end |
#extjs_reader(model) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/action_controller/controller.rb', line 12 def extjs_reader(model) { "successProperty" => extjs_success_property, "root" => extjs_root, "messageProperty" => }.merge(model.extjs_record) end |