# File lib/shoulda/matchers/active_record/have_db_column_matcher.rb, line 297 def primary? model.primary_key == name end
class Shoulda::Matchers::ActiveRecord::HaveDbColumnMatcher::DecoratedColumn
@private
Attributes
model[R]
Public Class Methods
new(model, column)
click to toggle source
Calls superclass method
# File lib/shoulda/matchers/active_record/have_db_column_matcher.rb, line 288 def initialize(model, column) @model = model super(column) end
Public Instance Methods
primary?()
click to toggle source
type_cast_default()
click to toggle source
# File lib/shoulda/matchers/active_record/have_db_column_matcher.rb, line 293 def type_cast_default model.column_defaults[name] end