In your Gemfile: gem ‘dynamic_forms_engine’, path: “path/to/gem”
Install gems:
bundle install
Install migrations:
rake dynamic_forms_engine:install:migrations
Migrate db:
rake db:migrate
Add to User model
has_many :dynamic_form_entries, class_name: "DynamicFormsEngine::DynamicFormEntry"
in config/routes.rb:
mount DynamicFormsEngine::Engine => "/dynamic_forms_engine"
Prepend any link paths in application layouts with main_app.
, e.g. main_app.new_foo_path
instead of new_foo_path
Add bootstrap-datepicker-rails
to your gemfile, *= require bootstrap-datepicker
to application.css, and ‘//= require bootstrap-datepicker` to application.js . This is a workaround because rails didn’t like it being included in the engine for some reason.
-
jQuery
-
jQuery UI
-
Bootstrap
To extend controllers or models, put decorators in i.e. app/decorators/controllers/dynamic_forms_engine/foobars_controller_decorator.rb where it will be included automatically by the engine, e.g.: # app/decorators/controllers/dynamic_forms_engine/dynamic_form_types_controller_decorator.rb DynamicFormsEngine::DynamicFormTypesController.class_eval do <add stuff here> end