Skip to content
parndt edited this page Mar 1, 2012 · 6 revisions

Changelog

This page is a work-in-progress; if you feel like there is something that should be mentioned here, feel free to add it!

2.0

Workflow

You must run rake db:seed when installing an engine!

Engines no longer seed by default. The proper workflow to create an engine is now:

# Add engine to your Gemfile
rails g refinery:<your_engine>
rake db:migrate
rake db:seed

Settings are now customized in the config/initializers/refinery directory, not in the admin back-end.

All settings inside your Refinery application are now kept inside config/initializers/refinery. They're copied there when you generate your engine.


The Settings engine is no longer included as part of Refinery Core

Now as an installable engine located here.


Engines

Engines are now generated in a different format.

Now, use:

rails generate refinery:engine <model_name> field:type field:type field:type

For more options, simple run:

rails generate refinery:engine


Settings are no longer handled by RefinerySetting

Settings are no longer referred to as RefinerySetting, but as Refinery::<Engine>.value. For example, inside an engine named Portfolio, you might refer to Refinery::Portfolio.approximate_ascii_for_i18n.

Internally, they are handled inside engines in two separate files. First, default values are declared inside lib/refinery/<engine_name>/configuration.rb Secondly, the file that is interpreted when generating the engine is kept inside lib/generators/refinery/<engine_name>/templates/config/initializers/<engine_name>.rb.erb. You can see an example of the configuration file here, and you can see an example of the generator file here


Namespacing for official engines has changed.

Now Refinery::<Engine>::(Admin::)?(Model || Controller) — for example, Refinery::Blog::Post or Refinery::Blog::Admin::PostsController.


Clone this wiki locally