nowk
3/23/2013 - 9:29 PM

tableless_model.rb

class TablelessModel
  include ActiveModel::Validations
  include ActiveModel::Conversion
  extend ActiveModel::Naming

  def initialize(attributes = {})
    attributes.try(:each) do |name, value|
      send("#{name}=", value)
    end
  end

  def persisted?
    false
  end
end