Class: Admin::ImageBuilder

Inherits:
ActionView::Helpers::FormBuilder
  • Object
show all
Defined in:
lib/ecrire/app/forms/admin/image_builder.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object (protected)



20
21
22
# File 'lib/ecrire/app/forms/admin/image_builder.rb', line 20

def method_missing(method, *args, &block)
  @template.send(method, *args, &block)
end

Instance Method Details

#messageObject



4
5
6
7
8
9
10
# File 'lib/ecrire/app/forms/admin/image_builder.rb', line 4

def message
  if object.header?
     :p, "You can replace your header by either <strong>clicking</strong> or <strong>dropping</strong> a picture here.".html_safe
  else
     :p, "Upload a picture for your post' header by either <strong>clicking</strong> or <strong>dropping</strong> a picture here".html_safe
  end
end