Module: Proscenium::LinkToHelper
- Defined in:
- lib/proscenium/link_to_helper.rb
Instance Method Summary collapse
-
#link_to(*args, &block) ⇒ Object
Overrides ActionView::Helpers::UrlHelper#link_to to allow passing a component instance as the URL, which will build the URL from the component path, eg.
Instance Method Details
#link_to(*args, &block) ⇒ Object
Overrides ActionView::Helpers::UrlHelper#link_to to allow passing a component instance as the URL, which will build the URL from the component path, eg. `/components/my_component`. The resulting link tag will also populate the `data` attribute with the component props.
Example:
link_to 'Go to', MyComponent
TODO: ummm, todo it! ;)
13 14 15 16 17 18 19 20 21 |
# File 'lib/proscenium/link_to_helper.rb', line 13 def link_to(*args, &block) # name_argument_index = block ? 0 : 1 # if (args[name_argument_index]).respond_to?(:render_in) # return super(*LinkToComponentArguments.new(args, name_argument_index, # self).helper_options, &block) # end super end |