Skip to content

Commit

Permalink
Checking in a minimal active_model shim, but it's a bigger job than j…
Browse files Browse the repository at this point in the history
…ust this, so checking this in and tabling it
  • Loading branch information
Philip (flip) Kromer committed May 22, 2011
1 parent 282d55e commit eb2bce5
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions lib/gorillib/receiver/active_model_shim.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
require 'active_model'

module Receiver
class ActiveModelShim
extend ActiveModel::Naming

def to_model
self
end

def valid?() true end
def new_record?() true end
def destroyed?() false end

def errors
@_errors ||= ActiveModel::Errors.new(self)
end
end
end

0 comments on commit eb2bce5

Please sign in to comment.