- Update to rails 7.1.2 and ruby 3.2.2
- Use larger image preview size for file fields
- Remove MS tile support
- Fix releaf ckeditor assets copying
- Rails 7.0 support
- Fix CKEditor assets
- Ruby 3.1 support
- Remove rails-settings-cached gem dependency
- Simplify 403/404 responses by always responding with html
- Ruby 3.0 support
- Rails 6.1 support
- Ruby 2.7 support
- Improve rspec test helpers
- Rails 6.0 support
- Cache menu builder access control instance
- Add correct time formatting in table builder
- Fix a bug in has_error? matcher
- Fix CKEditor 4.9 file upload issue
- Use respond_with for show action
- Fix sidebar css for compact view
- Minor rspec
auth_as_user
helper improvement for better user instance support
- Add richtext support to
Releaf::Settings
- Fix a problem with content tree building
- Initialize search form via
contentloaded
event
- Add more convient way to detect whether menu item is group
- Fix broken admin controller custom routes helper support
- Use controller definition path for resolving default controller redirect
- Add textarea support to
Releaf::Settings
- Fix a bug that always regenerated slugs from content node titles during copying
- Improve performance in case of many content nodes
- Return content node instance from copy and move service calls
- Fix breacrumbs link for controllers for "show" method instead of "edit"
- Add "cache_instance_method" rspec matcher
- Fix an incompletely merged PR
- Fix a localization issue with datetime fields
- Correctly return empty features array for Releaf::RootController
- Render Releaf 404 error page when resource is not found
- Remove "go home" link from error pages
- Fix pluralization support for
releaf-i18n_database
to return correct pluralization - Remove "twitter_cldr" in favour of "rails-i18n" gem for translation
pluralization support in
releaf-i18n_database
- Added layout features. Controller from now can choose which parts(header, sidebar, main) must be rendered
- Added support for CKEditor filebrowserBrowseUrl configuration
- Fix broken content nodes copy and move dialogs
- Deep copy support added for node content objects
- Make Releaf resource creation MS Edge compatible by using html5 history API to load new resource location and content when created with xhr
Releaf::Builders::FormBuilder
now has a separatereleaf_has_many_association_attributes
method that can be overridden in custom builders to add extra HTML attributes to a nested item section
- Make possible to safely use translations in routes while using
releaf-i18n_database
gem
- Added slug format validation for content nodes
- Fixed broken "Save and create another" feature
- fix builder scope resolving in cases when application scope has
nil
value
Releaf.application.config.i18n_database.translation_auto_creation_patterns
configuration variable added for custom translation auto creation patterns matching. Default value is[ /.*/ ]
to create all incoming keys.
application_builder_scope
method from controller removed.- controller will try to resolve builders also in application wide
scope (ex. from now it is possible to have
Admin::FormBuilder
for application wide default admin form builder)
Releaf::InstanceCache
has been rewrited for more convient way to define methods to cache. It is possible to define either single or array of methods to cache:def SomeClass include Releaf::InstanceCache cache_instance_methods :some_value, :another_value cache_instance_method :some_value def some_value :a end def another_value :b end def totally_another_value :c end end
Releaf.application.config.i18n_database.create_missing_translations
config renamed toReleaf.application.config.i18n_database.translation_auto_creation
- I18n.t
create_missing
option renamed toauto_create
- I18n.t
create_default
option removed - Use chained translation backends with
Releaf::I18nDatabase::Backend
as primary andI18n::Backend::Simple
as secondary backend Releaf.application.config.i18n_database.translation_auto_creation_exclusion_patterns
config added with default value[/^attributes\./]
to ignore default translations comming from activerecord attribute humanization method.- It is possible to add custom regexp patterns to prevent certain translations to be created
in database (for example add
config.i18n_database.translation_auto_creation_exclusion_patterns += [/^activerecord\.attributes\./]
to your Releaf initializer to preventactiverecord.attributes.*
creation) - As there is backend chain available, it is recommended to create default, hardcoded translations (date and number formats for example) with standart localization yml files (config/locales/*.yml)
I18n.backend.translations_cache.locales_pluralizations
method moved toReleaf::I18nDatabase::Backend.locales_pluralizations
- It is possible to reset Releaf translation cache with
Releaf::I18nDatabase::Backend.reset_cache
Releaf::TestHelpers
test helpers renamed toReleaf::Test::Helpers
- For better Releaf tests behaviour add
Releaf::Test.reset!
toRSpec.after(:each)
- Controllers
current_url
andindex_url
methods renamed tocurrent_path
andindex_path
form_options
,form_attributes
andform_url
methods moved from Releaf::ActionController toReleaf::Builders::EditBuilder
as its edit builder responsibility for it's own contentReleaf::Builders::EditBuilder
for now have#form_builder_class
method for custom form builder class overridingtable_options
method moved from Releaf::ActionController toReleaf::Builders::IndexBuilder
Releaf::ItemOrderer
refactored toArray::Reorder
service- Array now have #reorder method for simple array reordering
- You must update builders from old reorder code to new syntax:
def field_names
orderer(super).reorder(:title, :first).result
end
now can be written simple as:
def field_names
super.reorder(:title, :first)
end
Releaf::ControllerDefinition
implemented for unified controller meta-data handling. Custom menu builders need to be rewritted to use controller definition instead of hash instance.
Releaf::ErrorFormatter
refactored asReleaf::BuildErrorsHash
service. Also, extra features asfull_message
anddata
passing to errors hash has been removed. For this kind of features, extendReleaf::BuildErrorsHash
service and add all additional feautures to your custom class.
- Object title resolvation refactored.
From now
to_text
need to be renamed toreleaf_title
in existing project. Releaf will try to check whether method exist and then return its result. Resolvable methods list:releaf_title
,name
,title
,to_s
. You can migrate you existingto_text
methods with:
perl -p -i -e 's/to_text/releaf_title/g' `grep -ril "to_text" *`
- Translations models and tables renamed.
create migration rails g migration RenameReleafI18nBackendTables
and put following content in migration file:
class RenameReleafI18nBackendTables < ActiveRecord::Migration
def up
remove_index :releaf_translation_data, name: "index_releaf_translation_data_on_lang_and_translation_id"
rename_table :releaf_translations, :releaf_i18n_entries
rename_table :releaf_translation_data, :releaf_i18n_entry_translations
rename_column :releaf_i18n_entry_translations, :translation_id, :i18n_entry_id
rename_column :releaf_i18n_entry_translations, :lang, :locale
rename_column :releaf_i18n_entry_translations, :localization, :text
end
def down
rename_table :releaf_i18n_entries, :releaf_translations
rename_table :releaf_i18n_entry_translations, :releaf_translation_data
rename_column :releaf_translation_data, :i18n_entry_id, :translation_id
rename_column :releaf_translation_data, :locale, :lang
rename_column :releaf_translation_data, :text, :localization
add_index :releaf_i18n_entry_translations, [:locale, :i18n_entry_id], unique: true,
name: :index_releaf_i18n_entry_translations_on_locale_i18n_entry_id
end
end
remove allow_any_instance_of(Releaf::I18nDatabase::Backend).to receive(:reload_cache?) { false }
line from your
spec/rails_helper.rb
- Remove db level uniqueness index for translations key.
create migration rails g migration ChangeReleafTranslationsKeyIndexType
and put following content in migration file:
class ChangeReleafTranslationsKeyIndexType < ActiveRecord::Migration
def up
remove_index :releaf_translations, :key
add_index :releaf_translations, :key
end
def down
remove_index :releaf_translations, :key
add_index :releaf_translations, :key, unique: true
end
end
- all Releaf controller assets (javascripts and stylesheets) moved from
releaf/controllers/releaf/controller_name
pattern tocontrollers/releaf/controller_name
. If you have existing controller assets that inherit Releaf controller assets simply remove firstreleaf/
part. ex.//= require releaf/controllers/releaf/content/nodes
to//= require controllers/releaf/content/nodes
Releaf::Settings.register
method refactored to accepts list of hashes as arguments. ex.Releaf::Settings.register({key: "some.thing", default: "some day"}, {key: "color", default: "red"})
:search
feature added. When customfeatures
method provided, add:search
to returned array if search is needed.Releaf::BaseController
renamed toReleaf::ActionController
. Update all your code with:
perl -p -i -e 's/Releaf::BaseController/Releaf::ActionController/g' `grep -ril "Releaf::BaseController" *`
- Releaf::ActionController
setup
has been removed in favour offeatures
andresources_per_page
methods. - Releaf::ActionController
features
must return array with allowed features instead of Hash with true/false values.
def setup
super
self.features = {
edit: true,
index: true,
}
self.resources_per_page = 15
end
can be rewritted as:
def features
[:index, :edit]
end
def resources_per_page
15
end
Releaf::BaseController
renamed toReleaf::ActionController
. Update all your code with:
perl -p -i -e 's/Releaf::BaseController/Releaf::ActionController/g' `grep -ril "Releaf::ActionController" *`
- All
Releaf::Core::
namespaces replaced withReleaf::
except Releaf::Core component. To update site, you need to:- Replace all
Releaf::Core::
toReleaf::
with only exceptionReleaf::Core
component withinconfig/initializer/releaf.rb
componets section. Replacement script:perl -p -i -e 's/Releaf::Core/Releaf/g' `grep -ril "Releaf::Core" * | grep -v "config/initializers/releaf.rb"`
- Replace
releaf/core/settings
toreleaf/settings
withinconfig/initializer/releaf.rb
menu config.
- Replace all
Releaf.application.config.assets_resolver_class_name
configuration option removed in favour of custom builder. If there are need for custom assets resolver, create new page layout builder and override assets resolver in builder.
- Releaf core fully decoupled from any authentication and user/role dependancies. It is possible to not use "releaf-permissions" at all and have userless system or swap with other authorization subsystem.
- Configuration refactored to be more component-centric.
virtus
gem added for simple model creation. Service classes can be created by addinginclude Releaf::Core::Service
. Service call is accessable bycall
with all arguments defined within serviceconfig/intializers/releaf.rb
updates:- Add
Releaf::Core
as first component toconfig.components
configuration - Remove
Releaf::Core::SettingsUI
fromconfig.components
configuration - Remove
releaf/permissions/profile
fromconfig.additional_controllers
configuration
- Add
spec/rails_helper.rb
updates- Remove
Releaf::I18nDatabase.create_missing_translations = false
- Add
allow( Releaf.application.config.i18n_database ).to receive(:create_missing_translations).and_return(false)
withinbefore(:each)
block
- Remove
- *Component suffix has been removed. Releaf initializer needs to be updated if components has been specified.
-
.nodes
and#node
methods removed from defaultacts_as_node
models and controllers due to implementing support for multiple node classes.If reverse node lookup from content classes is needed, reimplement it in the specific application where the needed node class name is known.
-
Builder scopes in admin controllers are now inherited from parent controllers up to
Releaf::BaseController
. -
Magic
Admin::Nodes
builder scope is no longer prepended byReleaf::Content::NodesController
.This is no longer needed because releaf controllers can now be extended and the child controllers can have their own builders.
Note that controller assets are not automatically inherited and need to be explicitly loaded by the child controller.
Updating applications that use custom
Admin::Nodes
builder scope: (see Dummy application for a working example)-
Create
Admin::NodesController < Releaf::Content::NodesController
-
Change releaf menu in
config/initializers/releaf.rb
:
Instead of
{ :controller => 'releaf/content/nodes', :icon => 'sitemap', }
Use
{ :controller => 'admin/nodes' }
- Override node resource configuration in
config/initializers/releaf.rb
:
Add the following:
config.content.resources = { 'Node' => { controller: 'Admin::NodesController' } }
- Create
app/assets/javascripts/controllers/admin/nodes.js
with the following content:
//= require releaf/controllers/releaf/content/nodes
- Create
app/assets/stylesheets/controllers/admin/nodes.scss
with the following content:
@import 'releaf/controllers/releaf/content/nodes';
- Make sure that controller assets of the application are being precompiled.
This can be enabled by appending the following to
config/initializers/assets.rb
:Rails.application.config.assets.precompile += %w( controllers/*.css controllers/*.js )
-
Update
default_controller
of existing users in DB to use the new controller name -
Update existing role permissions in DB to use the new controller name
-
-
Dummy application now uses an extended
Admin::Nodes
controller instead of the defaultReleaf::Content::NodesController
-
releaf_routes_for
helper has been renamed tonode_routes_for
. -
node_class
param is now always added to generated node routes along withnode_id
andlocale
-
The signature of the old
Releaf::Content::Route.for
helper has changed and now it expects node model class name as the first argument.If it is still used directly somewhere in
routes.rb
instead of the now preferrednode_routes_for
, then it should be changed fromReleaf::Content::Route.for(TextPage).each do|route| ... end
to
Releaf::Content::Route.for(Node, TextPage).each do|route| ... end
-
Multiple node models and controllers are now supported.
Node resource configuration can be overriden via
content.resources
key inconfig/initializers/releaf.rb
There are three typical scenarios:
- Default configuration
Node model is called
Node
and handled byReleaf::Content::NodesController
Nothing needs to be changed for this to work except renaming
releaf_routes_for
tonode_routes_for
inroutes.rb
- Custom node model and/or controller
For example, if a model called
SomeOtherNode
needs to be used instead ofNode
and it will be handled in admin byAdmin::NodesController
, then the configuration looks as follows:config.content.resources = { 'SomeOtherNode' => { controller: 'Admin::NodesController' } }
- Multiple per-site node models in separate content trees
When a single application needs to handle multiple separate websites with separate content trees, multiple node models can be used.
An example configuration would look as follows.
In
config/initializers/releaf.rb
:config.content.resources = { 'Node' => { controller: 'Releaf::Content::NodesController', routing: { site: "main_site", constraints: { host: /^releaf\.local$/ } } }, 'OtherSite::OtherNode' => { controller: 'Admin::OtherSite::OtherNodesController', routing: { site: "other_site", constraints: { host: /^other\.releaf\.local$/ } } } }
In
routes.rb
:node_routing( Releaf::Content.routing ) do node_routes_for(HomePage) do get 'show', as: "home_page" end node_routes_for(TextPage) do get 'show' end end
This configuration would mean that all
HomePage
andTextPage
nodes withNode
class would have their routes drawn constrained tohttp:://releaf.local/
host name and allHomePage
andTextPage
nodes usingOtherSite::OtherNode
node class would only have routes forhttp://other.releaf.local/
website.The drawn routes will have extra parameters
site
andnode_class
passed to them that can be used in the public website if needed. See#node_class
and#site
methods inapplication_controller.rb
of Dummy application for example usage.Each node tree can have its own structure and content types. Add structure validations to specific node models as needed.
If a node content type needs to only be available in a single site, the
node_routing
automation block can be omitted and the corresponding routes can be drawn for a specific node class and constrained manually:constraints Releaf::Content.routing['OtherSite::OtherNode'][:constraints] do node_routes_for(ContactsController, node_class: 'OtherSite::OtherNode') do get 'show', as: "contacts_page" end end
If multiple
node_routes_for
blocks are needed with the samenode_class
argument, they can be wrapped inside afor_node_class
block.for_node_class 'OtherSite::OtherNode' do node_routes_for(HomePage) do get 'show', as: "home_page" end node_routes_for(TextPage) do get 'show' end end
is the same as
node_routes_for(HomePage, node_class: 'OtherSite::OtherNode') do get 'show', as: "home_page" end node_routes_for(TextPage, node_class: 'OtherSite::OtherNode') do get 'show' end
- Node#url has been renamed to Node#path.
- Extra search fields should now be wrapped in a container with a "search-field" class using the search_field method of IndexBuilder unless a custom layout is needed.
- HTML classes "block", "clear" and "clear-inside" have been deprecated and will be removed soon. They are no longer used by releaf. Use
@include block-list;
, and@include clear-inside;
in SASS instead. - Custom input fields with text, email, password or number types now need to have a "text" class to be styled correctly.
- Main menu no longer has icons. You should remove all :icon keys from menu hash in config/initializers/releaf.rb
- Toolbox trigger now has a kebab icon and is located at the far right of rows in index views
- Toolbox items no longer have icons. You should pass nil as the icon argument to the button helper when creating custom toolbox items
- Gravatar image is no longer displayed in the user box in the header
current_params
method removed fromReleaf::BaseController
. Is it recommended to simply userequest.query_parameters
instead.
-
Refactored Releaf node public route definition syntax. Old syntax:
Rails.application.routes.draw do Releaf::Content::Route.for(HomePage).each do |route| get route.params('home_pages#show') end end
New equivalent:
Rails.application.routes.draw do releaf_routes_for(HomePage) do get 'show' end end
releaf_routes_for
accepts two parameters: node content class and optional options hash. By defaultreleaf_routes_for
routes requests to pluralized content class name controller (HomePage -> HomePagesController). It is possible to owerride default providing:controller
option with string representation of controllers name (such as'text_pages
', which will route toTextPagesController
). Example:releaf_routes_for(HomePage, controller: 'text_pages') do get 'show' end
releaf_routes_for
supports all simple route definition methos such asget
,put
,patch
,post
,delete
etc.resources
,resource
,scope
,namespace
however aren't supported and will cause unexpected behaviour (most likely an exception), if used.Old syntax is still supported, however it is advised to migrate to new syntex.
Here are all possible examples of new syntax (Given node.url is
/examples
):releaf_routes_for(HomePage) do get 'index' # GET '/examples' => HomePagesController#index get ':id' # GET '/examples/12' => HomePagesController#show, id == '12' delete ':id' # DELETE '/examples/12' => HomePagesController#destroy, id == '12' get ':id/details', to: 'details#show' # GET '/examples/12/details' => DetailsController#show, id == '12' end releaf_routes_for(TextPage, controller: 'info_pages') do get 'index' # GET '/examples' => InfoPagesController#index delete 'text_pages#destroy' # DELETE '/examples' => TextPagesController#destroy get 'info', to: '#info' # GET '/examples/info' => InfoPagesController#info get 'full-info', to: 'advanced_info_pages#info' # GET '/examples/full-info' => AdvancedInfoPagesController#info end
Naturally you can pass
:as
,:constraints
and other options supported by regularget
,put
and other methods.General rules of thumb:
- to create route to default contrller and to url of node, then just create route with string target method name:
releaf_routes_for(TextPage) do get 'index' end
- to create route to different controller, add
:to
option and specify controller and action:
releaf_routes_for(TextPage) do get 'list', to: 'info_pages#index' end
- to create route with additonal url, that routes to default controller,
don't specify controller controller in
:to
option:
releaf_routes_for(TextPage) do get 'list', to: '#index' end
- To route to differnt contrller from node url, just specify controller and action as first argument:
releaf_routes_for(TextPage) do get 'info_pages#show' end
- to change default controller, pass
:controller
argument:
releaf_routes_for(TextPage, controller: 'info_pages') do get 'index' end
Feel free to investigage pull request and especially routing tests
Releaf::Core::Application
andReleaf::Core::Configuration
introduced- From now all settings is available through
Releaf.application.config
instead ofReleaf
- Releaf initalizer must be updated by changing
Releaf.setup do |conf|
toReleaf.application.configure do
and replacing allconf.
withconfig.
- change
conf.layout_builder = CustomLayoutBuilder``` to
config.layout_builder_class_name = 'CustomLayoutBuilder'`
- Renamed
Releaf::TemplateFieldTypeMapper
toReleaf::Core::TemplateFieldTypeMapper
- Renamed
Releaf::AssetsResolver
toReleaf::Core::AssetsResolver
- Renamed
Releaf::ErrorFormatter
toReleaf::Core::ErrorFormatter
- Moved
Releaf::Responders
underReleaf::Core
namespace
- refactored
@searchable_fields
. Now you should override#searchable_fields
method instead. By default searchable fields will be guessed with help ofReleaf::Core::DefaultSearchableFields
- Renamed
Releaf::Search
toReleaf::Core::Search
- Releaf::Builders::IndexBuilder has been refactored with following changes:
search
method renamed tosearch_block
extra_search
method renamed toextra_search_block
pagination
method renamed topagination_block
- section header text and resources count translations renamed
- "global.admin" translation scope has been removed in favour of controller name scope
- Releaf::ResourceFinder was refactored and renamed to Releaf::Search.
If you used Releaf::ResourceFinder somewhere, you need to change
to
relation = Releaf::ResourceFinder.new(resource_class).search(parsed_query_params[:search], @searchable_fields, relation)
relation = Releaf::Search.prepare(relation: relation, text: parsed_query_params[:search], fields: @searchable_fields)
- Controller name scoped builders implemented. More there: http://cubesystems.github.io/releaf/documentation/builders.html#creation
- BaseController 'resource_params' method renamed to 'permitted_params'
- Releaf controllers now properly resolves namespaced classes For example Admin::Foo::BarsController previously would resolve to Bar class, now it will resolve to Foo::Bar class
- TinyMCE replaced by CKEditor as built-in WYSIWYG field editor
- Settings module renamed to Releaf::Settings.
- Releaf::Core::SettingsUIComponent component added. More there: https://github.com/cubesystems/releaf/wiki/Settings
- Richtext attachments moved to releaf component/controller concern. More there: https://github.com/cubesystems/releaf/wiki/Richtext-editor
- Removed Releaf::TemplateFilter includable module.
- Refactored how releaf stores form templates. Form templates are now stored in containers data-releaf-template html attribute.
-
Releaf::ResourceValidator was renamed to Releaf::ErrorFormatter. Releaf::ErrorFormatter.build_validation_errors was renamed to .format_errors.
If you used Releaf::ResourceValidator.build_validation_errors, update your code to use Releaf::ErrorFormatter.format_errors.
-
Releaf::ResourceValidator was rewriten. .build_validation_errors now only needs one argument - resource to validate.
It will now use "activerecord.errors.messages.[model_name]" as I18n scope for errors
-
BaseController 'index_row_toolbox' feature renamed to 'toolbox'
- Translation group removed
- Translations refactored
- Dragonfly updated from 0.9 to 1.0 Update instructions there: https://github.com/markevans/dragonfly/wiki/Upgrading-from-0.9-to-1.0
-
removed #protected attribute from releaf node
-
To render locale selection for content node override #locale_selection_enabled? method to return true for nodes that need locale selector.
This means that Releaf no longer check for releaf/content/_edit.locale partial. This partial will be ignored.
Rename Releaf::Permissions::Admin to Releaf::Permissions::User, change table name from releaf_admins to releaf_users
-
Modify releaf_roles.permisions to match changed naming for releaf/content/nodes, releaf/permissions/users, releaf/permissions/roles, releaf/i18n_database/translations
-
Modify releaf_roles.default_controller to be an existing one (for example from releaf/content to releaf/content/nodes)
-
Modify config/initializers/releaf.rb to use releaf/content/nodes, releaf/permissions/users, releaf/permissions/roles, releaf/i18n_database/translations
-
Refactored notification rendering (introduced Releaf::BaseController#render_notification) method.
Now notifications by default will consist of action name and "succeeded" or "failed" word. For example flash notice "Updated" will now be "Update succeeded".
- It is no longer required to add :id to permit_attributes options for ActiveRecord models, when using acts_as_node. It'll be added automatically, when permit_attributes option is used.
-
Converted Releaf::Node to Releaf::Contnet::Node module.
Instread of inheriting from Releaf::Node, inherit from ActiveRecord::Base and include Releaf::Content::Node
-
Releaf::Node is in refactoring process. The goal is to make it an abstract model (some day)
All existing projects that use Releaf::Node should create Node model that inherits from Releaf::Node. You will either need to rename releaf_nodes table to nodes or set table_name in Node model.
In all of your code you should use Node model now (instead of Releaf::Node). This includes migrations as well.
If you used Releaf::Node model in migrations, then it might be nessacery to rename releaf_nodes table renaming migration in such a way, that it renames table, before any other migration needs to access Node. Otherwise you'll get chicken and egg situation, when migration tries to access nodes table, while releaf_nodes table will be renamed to nodes much later.
Currently there is no way to specify alternative Node model.
-
Got rid of common fields.
If you were using common fields, you should migrate your data from common fields seralized hash (in data attribute), to attribute per common field.
-
To use new common field attributes, crete method 'own_fields_to_display' in your node model, that returns common attributes, for example: def own_fields_to_display [:page_title, :meta_description] end
-
Remove custom validations support from Releaf::Node via acts_as_node.
Instead you should add custom validations to your Node model
-
Renamed Releaf::Node::Route to Releaf::ContentRoute
- remove Releaf::Node#content_string field, as it was't used
- Extend Releaf::Node#data column to 2147483647 characters
additional_controllers
Releaf configuration variable introduced. Add controllers that are not accessible via menu, but needs to be accessible by admins to this list. These controllers will have permission checkbox in roles edit view, just like the rest of controllers inReleaf.menu
.
-
#build_validation_errors, #validation_attribute_name, #validation_attribute_field_id, and #validation_attribute_nested_field_name were extracted from Releaf::BaseController to Releaf::ResourceValidator module. If you called any of these methods manually, then you'll need to update your controllers. Also Releaf::ResourceValidator.build_validation_errors now accept two arguments: resource and error message scope (check the source from details)
-
Extracted functionality of filtering templates from params from Releaf::BaseController to Releaf::TemplateFilter includable module. You can now include this module in your controllers if you want similar functionality.
- Bump font-awesome-rails to >= 4.0.1.0. If you use it, update all html/css/javascript to use new font awesome classes
- Removed long unused lighbox javascript
- ajaxbox now checks presence of
data-modal
attrubute instead of it's value. Update your views. - If you want to open image in ajaxbox, you need to add
rel="image"
html attribute to links.
-
Moved
Releaf::BaseController#resource_class
functionality toReleaf::BaseController.resource_class
.Releaf::BaseController#resource_class
now callsReleaf::BaseController.resource_class
. Everywhere, whereReleaf::BaseController#resource_class
was overriden, you must update your code, to overrideReleaf::BaseController.resource_class
-
Renamed
@resources
to@collection
-
Renamed
Releaf::BaseController#resources_relation
toReleaf::BaseController#resources
-
Updated html and css to use collection class instead of resources class
-
Richtext field height will be set to outerHeight() of textarea
-
Releaf::BaseController#render_field_type
was extracted toReleaf::TemplateFieldTypeMapper
module. It's functionality was split.render_field_type, use_i18n = render_field_type(resource, field_name)
should now be rewriten to
field_type_name = Releaf::TemplateFieldTypeMapper.field_type_name(resource, field_name) use_i18n = Releaf::TemplateFieldTypeMapper.use_i18n?(resource, field_name)
-
created new helper method
ajax?
. If you were checkingparams[:ajax]
orparams.has_key?(:ajax)
etc, then you should update your code to useajax?
.:ajax
parameter is removed fromparams
has inmanage_ajax
before filter inReleaf::BaseApplicationController