Class: Inputs::AssetBox

Inherits:
Object
  • Object
show all
Defined in:
app/models/inputs/asset_box.rb

Instance Method Summary collapse

Constructor Details

#initialize(object, object_name, template, method, opts) ⇒ AssetBox

Returns a new instance of AssetBox.



5
6
7
8
9
10
# File 'app/models/inputs/asset_box.rb', line 5

def initialize(object, object_name, template, method, opts)
  @object = object
  @object_name = object_name
  @template = template
  @options = initialize_options(method, opts)
end

Instance Method Details

#to_htmlObject



12
13
14
15
16
17
18
19
20
21
22
23
# File 'app/models/inputs/asset_box.rb', line 12

def to_html
  output = ''
  output += header_html
  output += attachments_html

  output += dialog_html if @options[:dialog]
  output += uploader_html if @options[:uploader]

  output += footer_html

  output.html_safe
end