Class: Taskr::Controllers::Actions
- Inherits:
-
REST
- Object
- REST
- Taskr::Controllers::Actions
- Defined in:
- lib/taskr/controllers.rb
Instance Method Summary collapse
Instance Method Details
#new ⇒ Object
38 39 40 41 42 |
# File 'lib/taskr/controllers.rb', line 38 def new @num = @input[:num] || 0 @actions = Taskr::Actions.list render :action_form end |
#parameters_form(id) ⇒ Object
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/taskr/controllers.rb', line 27 def parameters_form(id) @num = @input[:num] || 0 @action = Taskr::Actions.list.find {|a| a.to_s =~ Regexp.new("#{id}$")} if @action render :action_parameters_form else @status = 404 "Action #{id.inspect} not defined" end end |