Skip to content

Instantly share code, notes, and snippets.

@certainty
Created June 2, 2012 08:52
Show Gist options
  • Save certainty/2857391 to your computer and use it in GitHub Desktop.
Save certainty/2857391 to your computer and use it in GitHub Desktop.
A test with AR
class Base < ActiveRecord::Base
self.abstract_class = true
end
# the table foobars has the column abort:string
class Foobar < Base
self.table_name = "foobars"
end
# now in the console
> Foobar.new.abort
NoMethodError: private method `abort' called for #<Foobar id: nil, abort: nil, created_at: nil, updated_at: nil>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment