Module: ActionCrud::Helpers::Url

Defined in:
lib/action_crud/helpers/url.rb

Instance Method Summary collapse

Instance Method Details

#edit_record_path(*args) ⇒ Object

Get record edit path



53
54
55
56
57
58
# File 'lib/action_crud/helpers/url.rb', line 53

def edit_record_path(*args)
  options = args.extract_options!
  record  = args.first

  ActionCrud::Helpers::Route.new(self, record, :edit, options).path
end

#edit_record_url(*args) ⇒ Object

Get record edit absolute url



61
62
63
64
65
66
# File 'lib/action_crud/helpers/url.rb', line 61

def edit_record_url(*args)
  options = args.extract_options!
  record  = args.first

  ActionCrud::Helpers::Route.new(self, record, :edit, options).url
end

#new_record_path(*args) ⇒ Object

Get record new path



37
38
39
40
41
42
# File 'lib/action_crud/helpers/url.rb', line 37

def new_record_path(*args)
  options = args.extract_options!
  record  = args.first

  ActionCrud::Helpers::Route.new(self, record, :new, options).path
end

#new_record_url(*args) ⇒ Object

Get record new absolute url



45
46
47
48
49
50
# File 'lib/action_crud/helpers/url.rb', line 45

def new_record_url(*args)
  options = args.extract_options!
  record  = args.first

  ActionCrud::Helpers::Route.new(self, record, :new, options).url
end

#record_path(*args) ⇒ Object

Get record path



5
6
7
8
9
10
# File 'lib/action_crud/helpers/url.rb', line 5

def record_path(*args)
  options = args.extract_options!
  record  = args.first

  ActionCrud::Helpers::Route.new(self, record, :show, options).path
end

#record_url(*args) ⇒ Object

Get record absolute url



13
14
15
16
17
18
# File 'lib/action_crud/helpers/url.rb', line 13

def record_url(*args)
  options = args.extract_options!
  record  = args.first

  ActionCrud::Helpers::Route.new(self, record, :show, options).url
end

#records_path(*args) ⇒ Object

Get records index path



21
22
23
24
25
26
# File 'lib/action_crud/helpers/url.rb', line 21

def records_path(*args)
  options = args.extract_options!
  record  = args.first

  ActionCrud::Helpers::Route.new(self, record, :index, options).path
end

#records_url(*args) ⇒ Object

Get records index absolute url



29
30
31
32
33
34
# File 'lib/action_crud/helpers/url.rb', line 29

def records_url(*args)
  options = args.extract_options!
  record  = args.first

  ActionCrud::Helpers::Route.new(self, record, :index, options).url
end