Module: Releaf::ActionController::Views
- Extended by:
- ActiveSupport::Concern
- Included in:
- Releaf::ActionController
- Defined in:
- app/lib/releaf/action_controller/views.rb
Instance Method Summary collapse
- 
  
    
      #action_view(name_of_action)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Returns generic view name for given action. 
- 
  
    
      #action_views  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Returns action > view translation hash. 
- 
  
    
      #active_view  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Returns generic view name for current action. 
Instance Method Details
#action_view(name_of_action) ⇒ Object
Returns generic view name for given action
| 20 21 22 | # File 'app/lib/releaf/action_controller/views.rb', line 20 def action_view(name_of_action) action_views[name_of_action.to_sym] || name_of_action end | 
#action_views ⇒ Object
Returns action > view translation hash
| 10 11 12 13 14 15 16 | # File 'app/lib/releaf/action_controller/views.rb', line 10 def action_views { new: :edit, update: :edit, create: :edit, } end | 
#active_view ⇒ Object
Returns generic view name for current action
| 26 27 28 | # File 'app/lib/releaf/action_controller/views.rb', line 26 def active_view action_view(action_name) end |