Module: SimpleAdmin::PathHelper

Included in:
AdminHelper
Defined in:
app/helpers/simple_admin/path_helper.rb

Instance Method Summary collapse

Instance Method Details

#resource_path(res, options = {}) ⇒ Object



3
4
5
6
7
8
9
# File 'app/helpers/simple_admin/path_helper.rb', line 3

def resource_path(res, options={})
  if res.new_record?
    send("simple_admin_#{@interface.collection}_path", options)
  else
    send("simple_admin_#{@interface.member}_path", res, options)
  end
end