>
> def increaseVariable(scale)
> tempoints = 1 * scale
> self.variable += tempoints
> logger.debug "User variable is now #{user.variable}"
> end
> So when i run it, it says that there is an undefined method for
> "variable" but its up in the attr_accessible. What else could be wrong?
You'll get undefined method variable for nil because user.variable
should be self.variable instead. There's no user in increaseVariable
method.
Cheers!
Arzumy
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.