# File lib/shoulda/matchers/active_record/have_db_column_matcher.rb, line 315 def primary? model.primary_key == name end
class Shoulda::Matchers::ActiveRecord::HaveDbColumnMatcher::DecoratedColumn
@private
Attributes
Public Class Methods
Source
# File lib/shoulda/matchers/active_record/have_db_column_matcher.rb, line 306 def initialize(model, column) @model = model super(column) end
Calls superclass method
Public Instance Methods
Source
Source
# File lib/shoulda/matchers/active_record/have_db_column_matcher.rb, line 311 def type_cast_default model.column_defaults[name] end