Module: AASM::Generators::OrmHelpers

Instance Method Summary collapse

Instance Method Details

#model_contentsObject


5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/generators/aasm/orm_helpers.rb', line 5

def model_contents
  if column_name == 'aasm_state'
<<RUBY
  include AASM

  aasm do
  end
RUBY
  else
<<RUBY
  include AASM

  aasm :column => '#{column_name}' do
  end
RUBY
  end
end