Module: RaketaAdmin::Helpers::LinkHelper
- Included in:
- RaketaAdmin::Handlers::Handler
- Defined in:
- lib/raketa_admin/helpers/link_helper.rb
Class Method Summary collapse
Class Method Details
.link(resource, action, id = nil) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/raketa_admin/helpers/link_helper.rb', line 6 def self.link(resource, action, id = nil) case action when :index then "/#{resource}" when :new then "/#{resource}/new" when :show then "/#{resource}/#{id}" when :edit then "/#{resource}/#{id}/edit" else raise 'Undefined link location' end end |