Permalink
Browse files

Initialize accessors to remove some warnings in Ruby 2.0

  • Loading branch information...
1 parent 133cdf0 commit 7e10f38880fb0907d0bb61e996b76aedc6f1641e @carlosantoniodasilva carlosantoniodasilva committed Nov 19, 2012
Showing with 4 additions and 7 deletions.
  1. +2 −4 activerecord/test/cases/migration/helper.rb
  2. +2 −3 activerecord/test/models/reference.rb
@@ -2,12 +2,10 @@
module ActiveRecord
class Migration
- class << self
- attr_accessor :message_count
- end
+ class << self; attr_accessor :message_count; end
+ self.message_count = 0
def puts(text="")
- ActiveRecord::Migration.message_count ||= 0
ActiveRecord::Migration.message_count += 1
end
@@ -4,9 +4,8 @@ class Reference < ActiveRecord::Base
has_many :agents_posts_authors, :through => :person
- class << self
- attr_accessor :make_comments
- end
+ class << self; attr_accessor :make_comments; end
+ self.make_comments = false
before_destroy :make_comments

0 comments on commit 7e10f38

Please sign in to comment.