Module: Kwartz::Helper::ActionViewHelper
- Defined in:
- lib/kwartz/helper/rails.rb
Overview
helper module to add helper methods ‘start_link_tag()’ and ‘start_remote_link_tag()’.
Instance Method Summary collapse
-
#start_link_tag(options = {}, html_options = nil, *parameters) ⇒ Object
(also: #anchor)
return ‘<a href=“…”>’ start tag.
-
#start_remote_link_tag(options = {}, html_options = {}) ⇒ Object
(also: #anchor_remote)
ajax version of start_link_tag().
Instance Method Details
#start_link_tag(options = {}, html_options = nil, *parameters) ⇒ Object Also known as: anchor
return ‘<a href=“…”>’ start tag.
ex.
start_link_tag :action=>'show', :controller=>'user', :id=>1
#=> "<a href=\"/user/show/1\">"
385 386 387 388 389 |
# File 'lib/kwartz/helper/rails.rb', line 385 def start_link_tag(={}, =nil, *parameters) s = link_to('', , , *parameters) s.sub!(/<\/a>\z/, '') s end |
#start_remote_link_tag(options = {}, html_options = {}) ⇒ Object Also known as: anchor_remote
ajax version of start_link_tag()
394 395 396 397 398 |
# File 'lib/kwartz/helper/rails.rb', line 394 def start_remote_link_tag(={}, ={}) s = link_to_remote(, ) s.sub!(/<\/a>\z/, '') s end |