I started learning rails by following the agile way. It comes to the
point where it puzzles me.
class Puzzle < ActiveRecord::Base
# virtual var, not existing in the database
@var_in_database = @var + 1 # var_in_database exists in database
Then when I do a save of this model it does nothing. I know that if I
instead put self.var_in_database it would work perfectly, but from my
limited knowledge of ruby @var should be working like self.var in most
cases. Now it is the rare case but I can't find the reason why this
Please solve my puzzle, thank you.