Sha256: 3a437b7f6130dc234d2e32da8b6040517a846f924dc11737d44bf1f1241b6cd2
Contents?: true
Size: 661 Bytes
Versions: 2
Compression:
Stored size: 661 Bytes
Contents
module MegaBar module MegaBarModelConcern module ClassMethods def get_path(action = nil) binding.pry # is this needed here? action ||= params[:action] case action when 'index' url_for(controller: env[:mega_env][:kontroller_class].to_s, action: params[:action], only_path: true) when 'new' url_for(controller: env[:mega_env][:kontroller_class].to_s, action: 'create', only_path: true) when 'edit' url_for(controller: env[:mega_env][:kontroller_class].to_s, action: 'update', only_path: true) else form_path = 'ack' end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mega_bar-0.5.2 | app/models/mega_bar/mega_bar_model_concern.rb |
mega_bar-0.5.1 | app/models/mega_bar/mega_bar_model_concern.rb |