Skip to content

v1.7.0

Compare
Choose a tag to compare
@varyonic varyonic released this 30 Nov 15:06
· 1 commit to main since this release
223e86a

The focus of v1.7 has been to:

  • use Rails layouts, views and partials,
  • to deprecate controller meta-programming
  • to make resource and page DSL optional.

In detail:

  • Uses a faster and more memory efficient fork of Arbre called Arbo. Elements are rendered using render_in instead of to_s . render_in may be used with either an Arbo::Context or an ActionView::Context .
  • Uses Rails layout views/layouts/active_admin.html.erb and views/active_admin/_head.html.erb . Views::Pages::Base and Views::Pages::Layout have been removed and are no longer available for subclassing or customization.
  • Uses the following Rails partials instead of Arbre view components. The replaced view components have been removed and are no longer available for subclassing or customization:
    • views/active_admin/base/_header.html.arb replaces Views::Header
    • views/active_admin/base/_title_bar.html.arb replaces Views::TitleBar
    • views/active_admin/base/_action_items.html.arb replaces Views::ActionItems
    • views/active_admin/base/_sidebar.html.arb replaces Views::Sidebar
    • views/active_admin/base/_footer.html.arb replaces Views::Footer
  • Reduced configuration DSL and controller meta-programming:
    • Using controller do ... end is deprecated in favor of defining and adding to a subclass of PageController or ResourceController.
    • actions and before_|after_ callbacks should be defined directly in the controller.
    • Passing blocks to member_action , collection_action or page_action is deprecated in favor of adding methods to the controller.
    • Passing blocks to batch_action is deprecated in favor of adding protected methods to the controller.
    • permit_params is deprecated in favor of adding permitted_attr_namesto the controller.
    • Passing a block to the show page presenter is deprecated in favor of defining a partial, _show.html.arb. Views::Pages::Show has been removed and is no longer available for subclassing.
    • Passing a block to the form page presenter is deprecated in favor of defining a partial, _form.html.arb. Views::Pages::Form has been removed and is no longer available for subclassing.
    • Passing a block to the index page presenter for :table is deprecated in favor of defining a partial _index_as_table.html.arb . Views::Pages::Index has been removed and is no longer available for subclassing.
    • content do ... end is deprecated in favor of defining a partial, _content.html.arb .
    • Setting page presenter :title is deprecated in favor of setting content_for(:page_title) in a partial instead.
    • Using action_item is deprecated in favor of defining a partial, _action_items.html.arb and populating with links.
    • Using filter is deprecated in favor of defining a partial, _filters_form.html.erb and passing filter settings into active_admin_filters_form_for