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 extension!

Extensions no longer seed by default. The proper workflow to create an extension is now:

# Add extension to your Gemfile
rails g refinery:<your_extension>
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 extension.


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

Now as an installable extension located here.


Extensions

Extension 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::<ExtensionNamespace>.value. For example, inside an extension named Portfolio, you might refer to Refinery::Portfolio.approximate_ascii_for_i18n.

Internally, they are handled inside extensions in two separate files. First, default values are declared inside lib/refinery/<extension_name>/configuration.rb Secondly, the file that is interpreted when generating the extension is kept inside lib/generators/refinery/<extension_name>/templates/config/initializers/<extension_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 extensions has changed.

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