Skip to content

Instantly share code, notes, and snippets.

@mboeh
Created June 23, 2009 21:24
Show Gist options
  • Save mboeh/134856 to your computer and use it in GitHub Desktop.
Save mboeh/134856 to your computer and use it in GitHub Desktop.
>> Rails.version
=> "2.1.2"
>> AbstractThingy < ActiveRecord::Base
=> true
>> AbstractThingy.record_timestamps
=> true
>> OneOfManyThingies < AbstractThingies
=> true
>> OneOfManyThingies.record_timestamps
=> nil
Result: descendants of abstract ActiveRecord classes do not get
updated_at/created_at recorded. Greeeeat.
REVISED: the issue is that AbstractThingy.inherited is defined
and doesn't call super. Complaint partially revoked, although
this is an instance in which I'd like Rails' magicness to be a
bit more paranoid and complain.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment