Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Celso Dantas's Profile

GitHub User: celsodantas

Comments by Celso Dantas

Avatar

found it:

ruby
self.class_variable_set :@@variable_name, "initial value"
Avatar

any idea how to create a separate class variable to each model inheriting from ActiveRecord::Base?

@@disable_validation will be the same object to all classes that inherit from ActiveRecord::Base, and I don't want that. =[ I need to create a specific counter to each Rails Model.

any tip?

Avatar

Any idea how to enable partial matching? Make it work like; "select * from posts where title like 'query%'"