Sha256: 50ced1e3b118cd011fcbb5265b767c5a0b3e82f020046ae936a055bfc53af3e7
Contents?: true
Size: 1017 Bytes
Versions: 25
Compression:
Stored size: 1017 Bytes
Contents
ActiveAdmin.register ActiveadminSelleoCms::Section, as: "Section", sort_order: "name_asc" do config.batch_actions = false config.paginate = true actions :all, except: :show form :partial => "form" scope :blurbs, default: true scope :help index do column :name column :created_at do |page| l page.created_at, format: :short end column :updated_at do |page| l page.updated_at, format: :short end column :actions do |resource| links ||= link_to(I18n.t('active_admin.edit'), edit_resource_path(resource.id), :class => "member_link edit_link") end end controller do respond_to :html, :js def create create! do |success, failure| success.html { redirect_to admin_sections_path } failure.html { render action: :new } end end def update update! do |success, failure| success.html { redirect_to admin_sections_path } failure.html { render action: :edit } end end end end
Version data entries
25 entries across 25 versions & 1 rubygems