Class: Categoryz3::CategoriesSelect

Inherits:
Object
  • Object
show all
Defined in:
lib/categoryz3/categories_select.rb

Instance Method Summary collapse

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, options = {}) 
  normalize_options(options)
  @context = context
  @object_name = object_name
end

Instance Method Details

#outputObject

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