Class: NavLinkHelper::LinkGenerator
- Inherits:
-
Object
- Object
- NavLinkHelper::LinkGenerator
- Includes:
- ActionView::Helpers::UrlHelper
- Defined in:
- app/helpers/nav_link_helper.rb
Instance Method Summary collapse
-
#initialize(request, title, path, html_options = {}, options = {}) ⇒ LinkGenerator
constructor
A new instance of LinkGenerator.
- #to_html ⇒ Object
Constructor Details
#initialize(request, title, path, html_options = {}, options = {}) ⇒ LinkGenerator
Returns a new instance of LinkGenerator.
15 16 17 18 19 20 21 |
# File 'app/helpers/nav_link_helper.rb', line 15 def initialize(request, title, path, = {}, = {}) @request = request @title = title @path = path @html_options = @options = end |
Instance Method Details
#to_html ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'app/helpers/nav_link_helper.rb', line 23 def to_html html = link if @options[:wrapper] html = content_tag(@options[:wrapper], html, :class => wrapper_classes) end html.html_safe end |