Skip to content
This repository was archived by the owner on Aug 1, 2018. It is now read-only.

Problem with cache_classes = true #53

@badosu

Description

@badosu

Deploying to heroku I've seen some problems when this is set to true.

For some reason, formtastic does not reload some classes when it's needed. So I see things like:

NoMethodError: undefined method `editor' for #<ActiveAdmin::Application:0x007f08134ae5f8>
ActionView::Template::Error (Unable to find input class HtmlEditorInput)
/app/config/initializers/active_admin_editor.rb:1:in `<top (required)>': uninitialized constant ActiveAdmin::Editor (NameError)

See: rails/spring#95 for references.

I was able to make a workaround for this error, prepending this to the initializer:

require 'active_admin_editor'
require "#{Gem::Specification.find_by_name("active_admin_editor").gem_dir}/app/inputs/html_editor_input"

This is problem an error more related to Formtastic than to this gem, but this should be useful for someone who has the same problem.

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