Class: Categoryz3::CategoriesSelect
- Inherits:
-
Object
- Object
- Categoryz3::CategoriesSelect
- Defined in:
- lib/categoryz3/categories_select.rb
Instance Method Summary collapse
-
#initialize(context, object_name, options = {}) ⇒ CategoriesSelect
constructor
Initialize the category select.
-
#output ⇒ Object
Public: Returns the select tag html with javascript.
Constructor Details
#initialize(context, object_name, options = {}) ⇒ CategoriesSelect
Initialize the category select
context: is the actual template, from where helpers can be called object_name: the object_name for the form options: Extra options for the select tag and javascripts
10 11 12 13 14 |
# File 'lib/categoryz3/categories_select.rb', line 10 def initialize(context, object_name, = {}) () @context = context @object_name = object_name end |
Instance Method Details
#output ⇒ Object
Public: Returns the select tag html with javascript
18 19 20 |
# File 'lib/categoryz3/categories_select.rb', line 18 def output (select_tag + javascript_tag).html_safe end |