Module: RoutesHelper

Defined in:
app/helpers/routes_helper.rb

Instance Method Summary collapse

Instance Method Details

#extract_page_options(args) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'app/helpers/routes_helper.rb', line 10

def extract_page_options(args)
  options = args.dup.extract_options!
  object = args.first
  if object.kind_of?(Page)
    return options.merge(:url => object.url)
  else
    return args
  end
end

#page_path(*args) ⇒ Object



2
3
4
# File 'app/helpers/routes_helper.rb', line 2

def page_path(*args)
  super(extract_page_options(args))
end

#page_url(*args) ⇒ Object



6
7
8
# File 'app/helpers/routes_helper.rb', line 6

def page_url(*args)
  super(extract_page_options(args))
end