Module: Puzzlize::Schema
- Defined in:
- lib/puzzlize/schema.rb
Constant Summary collapse
- @@schema =
[ :vertical_piece_size, :horizontal_piece_size, :vertical_pieces, :horizontal_pieces, :image_width, :image_height ]
Instance Method Summary collapse
Instance Method Details
#add_puzzlize_columns ⇒ Object
13 14 15 16 17 |
# File 'lib/puzzlize/schema.rb', line 13 def add_puzzlize_columns @@schema.each do |column_name| column(column_name, :integer) end end |
#remove_puzzlize_columns(table_name) ⇒ Object
19 20 21 22 23 |
# File 'lib/puzzlize/schema.rb', line 19 def remove_puzzlize_columns(table_name) @@schema.each do |column_name| remove_column(table_name, column_name) end end |