Skip to content

Apologies for ruby/rails newbie question - I get errors regarding UnpersistentModel #5

@acaeti

Description

@acaeti

Hello,

Sorry for the newbie issue, but I have problems validating an object I create using activeform-rails.

I created a new class, and included ActiveForm::Form and ActiveForm::ValidateUniqueness. When I attempt to validate a valid object (valid?), it works fine. When I attempt to validate an invalid object, I get "NameError: uninitialized constant ActiveForm::Form::ClassMethods::UnpersistentModel".

If I put in my class "include ActiveForm::UnpersistentModel" I get "NameError: uninitialized constant ActiveForm::UnpersistentModel".

If I put in my .rb file (or on my irb console) the actual code from the unpersistent_model.rb file, everything works fine.

I am sure I am doing something simple incorrectly, perhaps mixing ActiveForm::UnpersistentModel into my class incorrectly.

Your help appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions