Class: Admin::Kitsune::MediaController

Inherits:
KitsuneController
  • Object
show all
Defined in:
app/controllers/admin/kitsune/media_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



14
15
16
17
18
19
20
# File 'app/controllers/admin/kitsune/media_controller.rb', line 14

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

#newObject



8
9
10
11
12
# File 'app/controllers/admin/kitsune/media_controller.rb', line 8

def new
  @parent_instance = @parent.new_record
  @media = @model.new_record
  render :layout => false
end