Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Semantic Errors #67

Closed
kyreeves opened this issue Aug 24, 2015 · 4 comments
Closed

Semantic Errors #67

kyreeves opened this issue Aug 24, 2015 · 4 comments

Comments

@kyreeves
Copy link

Is there a way to display the errors of each model instance that fails to import?

@Fivell
Copy link
Member

Fivell commented Aug 24, 2015

@kyreeves , try to add custom block , sort of

 ActiveAdmin.register Post  do
    active_admin_import do 
        if  @importer.import_result.has_failed?
             flash[:notice] = 'Errors:'
             @importer.failed #collection of failed objects with validation errors, you can access them and retrieve errors
        end
    end
 end

@kyreeves
Copy link
Author

@Fivell I got this error...

undefined method `import_result' for #ActiveAdminImport::Importer:0x007fe51b4aa738

@Fivell
Copy link
Member

Fivell commented Aug 24, 2015

@kyreeves
Copy link
Author

@Fivell That worked! Thanks man!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants