search for: change_turn

Displaying 1 result from an estimated 1 matches for "change_turn".

2006 Jul 21
2
Tableless ActiveRecord attribute and my aching head
...- class Setup < ActiveRecord::Base def self.columns() @columns ||= []; end def self.column(name, sql_type = nil, default = nil, null = true) columns << ActiveRecord::ConnectionAdapters::Column.new(name.to_s, default, sql_type.to_s, null) end ... column :turn, :integer ... def change_turn if turn==0 turn = 1 else turn = 0 end end end -------------------------------- ok.... now the head-banger. Any time I called the ''change_turn'' method inside my new class, the turn wouldn''t actually be changed. Oh, I would put logger_debug stateme...