Module: Searchgasm::Helpers::ControlTypes::RemoteLink
- Defined in:
- lib/searchgasm/helpers/control_types/remote_link.rb
Overview
Remote Link Control Types
These helpers use rails built in remote_function as links.
Instance Method Summary collapse
-
#remote_order_as_link(order_as, options = {}) ⇒ Object
The same thing as order_as_link but instead of using rails link_to it uses link_to_remote.
-
#remote_order_by_link(order_by, options = {}) ⇒ Object
The same thing as order_by_link but instead of using rails link_to it uses link_to_remote.
-
#remote_page_link(page, options = {}) ⇒ Object
The same thing as page_link but instead of using rails link_to it uses link_to_remote.
-
#remote_per_page_link(per_page, options = {}) ⇒ Object
The same thing as per_page_link but instead of using rails link_to it uses link_to_remote.
Instance Method Details
#remote_order_as_link(order_as, options = {}) ⇒ Object
The same thing as order_as_link but instead of using rails link_to it uses link_to_remote
Examples
remote_order_as_link
remote_order_as_link(:remote => {:update => "users"})
Options
Please look at order_as_link, this accepts the same options with the following addition:
-
:remote
– default: {}, the options to pass into link_to_remote remote options. Such as :update => => “alert(‘success’)”
37 38 39 40 |
# File 'lib/searchgasm/helpers/control_types/remote_link.rb', line 37 def remote_order_as_link(order_as, = {}) add_remote_defaults!() order_as_link(order_as, ) end |
#remote_order_by_link(order_by, options = {}) ⇒ Object
The same thing as order_by_link but instead of using rails link_to it uses link_to_remote
Examples
remote_order_by_link
remote_order_by_link(:remote => {:update => "users"})
Options
Please look at order_by_link, this accepts the same options with the following addition:
-
:remote
– default: {}, the options to pass into link_to_remote remote options. Such as :update => => “alert(‘success’)”
20 21 22 23 |
# File 'lib/searchgasm/helpers/control_types/remote_link.rb', line 20 def remote_order_by_link(order_by, = {}) add_remote_defaults!() order_by_link(order_by, ) end |
#remote_page_link(page, options = {}) ⇒ Object
The same thing as page_link but instead of using rails link_to it uses link_to_remote
Examples
remote_page_link
remote_page_link(:remote => {:update => "users"})
Options
Please look at page_link, this accepts the same options with the following addition:
-
:remote
– default: {}, the options to pass into link_to_remote remote options. Such as :update => => “alert(‘success’)”
71 72 73 74 |
# File 'lib/searchgasm/helpers/control_types/remote_link.rb', line 71 def remote_page_link(page, = {}) add_remote_defaults!() page_link(page, ) end |
#remote_per_page_link(per_page, options = {}) ⇒ Object
The same thing as per_page_link but instead of using rails link_to it uses link_to_remote
Examples
remote_per_page_link
remote_per_page_link(:remote => {:update => "users"})
Options
Please look at per_page_link, this accepts the same options with the following addition:
-
:remote
– default: {}, the options to pass into link_to_remote remote options. Such as :update => => “alert(‘success’)”
54 55 56 57 |
# File 'lib/searchgasm/helpers/control_types/remote_link.rb', line 54 def remote_per_page_link(per_page, = {}) add_remote_defaults!() per_page_link(per_page, ) end |