Module: MegaBar::MegaBarModelConcern::ClassMethods
- Defined in:
- app/models/mega_bar/mega_bar_model_concern.rb
Instance Method Summary collapse
Instance Method Details
#get_path(action = nil) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/models/mega_bar/mega_bar_model_concern.rb', line 4 def get_path(action = nil) binding.pry # is this needed here? action ||= params[:action] case action when 'index' url_for(controller: params[:controller].to_s, action: params[:action], only_path: true) when 'new' url_for(controller: params[:controller].to_s, action: 'create', only_path: true) when 'edit' url_for(controller: params[:controller].to_s, action: 'update', only_path: true) else form_path = 'ack' end end |