Class: Template

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/template.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.reorderingObject



4
5
6
7
8
# File 'app/models/template.rb', line 4

def reordering
  @reordering = true
  yield
  @reordering = false
end

.reordering?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'app/models/template.rb', line 10

def reordering?
  @reordering
end

Instance Method Details

#template_parts_with_hash=(value) ⇒ Object



31
32
33
34
35
36
37
# File 'app/models/template.rb', line 31

def template_parts_with_hash=(value)
  if value.is_a? Hash
    @add_template_parts = order_and_extract(value)
  else
    template_parts_without_hash=(value)
  end
end