Created
February 7, 2012 21:16
-
-
Save josevalim/1762005 to your computer and use it in GitHub Desktop.
Custom AMo model for forms
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LintTest < ActiveSupport::TestCase | |
include ActiveModel::Lint::Tests | |
class Model | |
# model.to_model | |
include ActiveModel::Conversion | |
# Implements Model.model_name | |
extend ActiveModel::Naming | |
# model.valid?, model.errors | |
include ActiveModel::Validations | |
# Since this object is not persisted, | |
# set persisted to false. | |
def persisted?() false end | |
end | |
def setup | |
@model = Model.new | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment