Sha256: a74e5f5c760434e614f580a4ec82af3cb3e25a0ac6bb7f7b5f5f9d237222f205

Contents?: true

Size: 690 Bytes

Versions: 13

Compression:

Stored size: 690 Bytes

Contents

ActiveAdmin.register ActiveadminSelleoCms::Image, as: 'Image' do
  menu false

  form :partial => "form"

  member_action :crop, :method => :get do
    @image = ActiveadminSelleoCms::Image.find(params[:id])
  end

  controller do
    respond_to :html, :js

    before_filter :set_styles, only: [:create, :update]

    private

    def set_styles
      params[:image][:data] = params[:image].delete :data if params[:image][:data]
    end

    public

    def edit
      super do |format|
        format.html { render action: :edit, layout: false }
      end
    end

    def new
      super do |format|
        format.html { render action: :new, layout: false }
      end
    end
  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
activeadmin-selleo-cms-0.0.61 app/admin/activeadmin_selleo_cms/image.rb
activeadmin-selleo-cms-0.0.60 app/admin/activeadmin_selleo_cms/image.rb
activeadmin-selleo-cms-0.0.59 app/admin/activeadmin_selleo_cms/image.rb
activeadmin-selleo-cms-0.0.58 app/admin/activeadmin_selleo_cms/image.rb
activeadmin-selleo-cms-0.0.54 app/admin/activeadmin_selleo_cms/image.rb
activeadmin-selleo-cms-0.0.52 app/admin/activeadmin_selleo_cms/image.rb
activeadmin-selleo-cms-0.0.51 app/admin/activeadmin_selleo_cms/image.rb
activeadmin-selleo-cms-0.0.49 app/admin/activeadmin_selleo_cms/image.rb
activeadmin-selleo-cms-0.0.48 app/admin/activeadmin_selleo_cms/image.rb
activeadmin-selleo-cms-0.0.47 app/admin/activeadmin_selleo_cms/image.rb
activeadmin-selleo-cms-0.0.46 app/admin/activeadmin_selleo_cms/image.rb
activeadmin-selleo-cms-0.0.45 app/admin/activeadmin_selleo_cms/image.rb
activeadmin-selleo-cms-0.0.44 app/admin/activeadmin_selleo_cms/image.rb