Class: Redmine::Views::OtherFormatsBuilder
- Inherits:
-
Object
- Object
- Redmine::Views::OtherFormatsBuilder
- Defined in:
- lib/redmine/views/other_formats_builder.rb
Overview
Instance Method Summary collapse
-
#initialize(view) ⇒ OtherFormatsBuilder
constructor
A new instance of OtherFormatsBuilder.
- #link_to(name, options = {}) ⇒ Object
Constructor Details
#initialize(view) ⇒ OtherFormatsBuilder
Returns a new instance of OtherFormatsBuilder
21 22 23 |
# File 'lib/redmine/views/other_formats_builder.rb', line 21 def initialize(view) @view = view end |
Instance Method Details
#link_to(name, options = {}) ⇒ Object
25 26 27 28 29 30 |
# File 'lib/redmine/views/other_formats_builder.rb', line 25 def link_to(name, ={}) url = { :format => name.to_s.downcase }.merge(.delete(:url) || {}).except('page') = .delete(:caption) || name = { :class => name.to_s.downcase, :rel => 'nofollow' }.merge() @view.content_tag('span', @view.link_to(, url, )) end |