Sha256: fb38ac85b65ac6eb9b0b4b5d13a71a77754659d0cd4dd9e8198b4e7d1b9f6562

Contents?: true

Size: 742 Bytes

Versions: 13

Compression:

Stored size: 742 Bytes

Contents

class Admin::Kitsune::MediaController < Admin::Kitsune::KitsuneController
  layout 'admin/kitsune'
  
  helper 'admin/kitsune/records'
  
  before_filter :load_model
  
  def new
    @parent_instance = @parent.new_record
    @media = @model.new_record
    render :layout => false
  end
  
  def create
    @media = @model.new_record
    @upload = @model.new_record
    @parent_instance = @parent.new_record
    @upload.update_attribute(@parent.kitsune_admin[:media].values.first, params['image'])
    render 'new', :layout => false
  end
  
  private
  def load_model
    @parent = Kitsune::Inspector.new(params[:model_id].constantize) if params[:model_id]
    @model = Kitsune::Inspector.new(params[:id].constantize) if params[:id]
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
ds-kitsune-0.2.5 app/controllers/admin/kitsune/media_controller.rb
ds-kitsune-0.2.3 app/controllers/admin/kitsune/media_controller.rb
kitsune-0.2.1 app/controllers/admin/kitsune/media_controller.rb
kitsune-0.2.0 app/controllers/admin/kitsune/media_controller.rb
kitsune-0.1.5 app/controllers/admin/kitsune/media_controller.rb
kitsune-0.1.4 app/controllers/admin/kitsune/media_controller.rb
kitsune-0.1.3 app/controllers/admin/kitsune/media_controller.rb
kitsune-0.1.2 app/controllers/admin/kitsune/media_controller.rb
kitsune-0.1.1 app/controllers/admin/kitsune/media_controller.rb
kitsune-0.1.0 app/controllers/admin/kitsune/media_controller.rb
kitsune-0.0.19 app/controllers/admin/kitsune/media_controller.rb
kitsune-0.0.18 app/controllers/admin/kitsune/media_controller.rb
kitsune-0.0.17 app/controllers/admin/kitsune/media_controller.rb