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