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