Sha256: 495f748bb52b13af1ea46fe5d1cb3d57815c1b086ea58cc23e3553b315e3eda7
Contents?: true
Size: 210 Bytes
Versions: 5
Compression:
Stored size: 210 Bytes
Contents
class Draft < ActiveRecord::Base belongs_to :user belongs_to :parent, :polymorphic => true validates_presence_of :data, :target_type def restore target_type.constantize.from_draft(self) end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
drafting-0.3.1 | lib/drafting/draft.rb |
drafting-0.3.0 | lib/drafting/draft.rb |
drafting-0.2.0 | lib/drafting/draft.rb |
drafting-0.1.1 | lib/drafting/draft.rb |
drafting-0.1.0 | lib/drafting/draft.rb |