Sha256: 1b19eacc5b7b1074b6a834c0e1050c128e51e997087c0ef6143ae1e3c36d65be

Contents?: true

Size: 670 Bytes

Versions: 7

Compression:

Stored size: 670 Bytes

Contents

module ActiveAdmin
  module Views
    module Pages
      class Edit < Base

        def title
          I18n.t('active_admin.edit_model', :model => active_admin_config.resource_name)
        end

        def main_content
          config = self.form_config.dup
          config.delete(:block)
          config.reverse_merge!({
            :url => resource_path(resource),
            :as => active_admin_config.underscored_resource_name
          })

          if form_config[:partial]
            render form_config[:partial]
          else
            active_admin_form_for resource, config, &form_config[:block]
          end
        end

      end
    end
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
andrewroth_activeadmin-0.3.4 lib/active_admin/views/pages/edit.rb
activeadmin-0.3.4 lib/active_admin/views/pages/edit.rb
activeadmin-0.3.3 lib/active_admin/views/pages/edit.rb
activeadmin-0.3.2 lib/active_admin/views/pages/edit.rb
activeadmin-0.3.1 lib/active_admin/views/pages/edit.rb
activeadmin-0.3.0 lib/active_admin/views/pages/edit.rb
nsm-activeadmin-0.2.2 lib/active_admin/views/pages/edit.rb