module Stubbable
Public Instance Methods
column()
click to toggle source
# File lib/acts_as_stubbable.rb, line 19 def column # query the class this object belongs to to find the value self.class.column end
make_stub()
click to toggle source
# File lib/acts_as_stubbable.rb, line 10 def make_stub if !self.stub.blank? self.stub = self.stub.parameterize else self.stub = self.send(self.column).parameterize end self.errors.add(:stub, "cannot be blank") if self.stub == '' end