Module: ErpApp::Extensions::Railties::ActionView::Helpers::TagHelper
- Includes:
- ActionView::Helpers::TagHelper, ActionView::Helpers::UrlHelper
- Defined in:
- lib/erp_app/extensions/railties/action_view/helpers/tag_helper.rb
Instance Method Summary collapse
- #form_remote_tag(url, options = {}, &block) ⇒ Object
- #link_to_remote(name, url, options = {}) ⇒ Object
Instance Method Details
#form_remote_tag(url, options = {}, &block) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/erp_app/extensions/railties/action_view/helpers/tag_helper.rb', line 18 def form_remote_tag(url, ={}, &block) #add ajax_replace class [:class].nil? ? 'ajax_replace' : "#{[:class]} ajax_replace" #add remote => true to options .merge!({:remote => true}) if block_given? form_tag url, do yield end else form_tag url, end end |
#link_to_remote(name, url, options = {}) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/erp_app/extensions/railties/action_view/helpers/tag_helper.rb', line 10 def link_to_remote(name, url, ={}) #add ajax_replace class [:class].nil? ? 'ajax_replace' : "#{[:class]} ajax_replace" #add remote => true to options .merge!({:remote => true}) link_to name, url, end |