Module: RoutesHelper

Defined in:
app/helpers/routes_helper.rb

Instance Method Summary collapse

Instance Method Details

#extract_paper_options(args) ⇒ Object



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

def extract_paper_options(args)
  options = args.extract_options!
  object = args.first
  if object.is_a?(Paper)
    return options.merge(:id => object.url)
  else
    args << options
  end
end

#seo_blog_paper_category_path(category, options = {}) ⇒ Object



20
21
22
# File 'app/helpers/routes_helper.rb', line 20

def seo_blog_paper_category_path(category, options={})
  forgeos_blog.blog_paper_category_path(options.merge(:blog_category_id => category.url))
end

#seo_paper_path(*args) ⇒ Object



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

def seo_paper_path(*args)
  forgeos_blog.blog_paper_path extract_paper_options(args)
end

#seo_paper_url(*args) ⇒ Object



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

def seo_paper_url(*args)
  forgeos_blog.blog_paper_url extract_paper_options(args)
end