Skip to content

Commit

Permalink
Remove unusused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
jonleighton committed Mar 4, 2012
1 parent b4ac72c commit 7ba0fe2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,8 @@ def get_primary_key(base_name) #:nodoc:
# end
# Project.primary_key # => "foo_id"
def primary_key=(value)
@original_primary_key = @primary_key if defined?(@primary_key)
@primary_key = value && value.to_s
@quoted_primary_key = nil
@primary_key = value && value.to_s
@quoted_primary_key = nil
end
end
end
Expand Down
3 changes: 1 addition & 2 deletions activerecord/lib/active_record/locking/optimistic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ def locking_enabled?

# Set the column to use for optimistic locking. Defaults to +lock_version+.
def locking_column=(value)
@original_locking_column = @locking_column if defined?(@locking_column)
@locking_column = value.to_s
@locking_column = value.to_s
end

# The version column used for optimistic locking. Defaults to +lock_version+.
Expand Down
15 changes: 6 additions & 9 deletions activerecord/lib/active_record/model_schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,10 @@ def table_name
# You can also just define your own <tt>self.table_name</tt> method; see
# the documentation for ActiveRecord::Base#table_name.
def table_name=(value)
@original_table_name = @table_name if defined?(@table_name)
@table_name = value && value.to_s
@quoted_table_name = nil
@arel_table = nil
@relation = Relation.new(self, arel_table)
@table_name = value && value.to_s
@quoted_table_name = nil
@arel_table = nil
@relation = Relation.new(self, arel_table)
end

# Returns a quoted version of the table name, used to construct SQL statements.
Expand Down Expand Up @@ -152,8 +151,7 @@ def inheritance_column

# Sets the value of inheritance_column
def inheritance_column=(value)
@original_inheritance_column = inheritance_column
@inheritance_column = value.to_s
@inheritance_column = value.to_s
end

def sequence_name
Expand Down Expand Up @@ -183,8 +181,7 @@ def reset_sequence_name #:nodoc:
# self.sequence_name = "projectseq" # default would have been "project_seq"
# end
def sequence_name=(value)
@original_sequence_name = @sequence_name if defined?(@sequence_name)
@sequence_name = value.to_s
@sequence_name = value.to_s
end

# Indicates whether the table associated with this class exists
Expand Down

0 comments on commit 7ba0fe2

Please sign in to comment.