Sha256: 09a3259e73b91b7f71b971d95c2ddaea1e64356d57874bbc2bc5168ad9232846

Contents?: true

Size: 800 Bytes

Versions: 10

Compression:

Stored size: 800 Bytes

Contents

class Admin::FestivityPerformancesController  < Admin::ResourceController
  def create
    event = FestivityEventPage.find(params[:event_page_id])
    performance = event.festivity_performances.new
    if performance.save
      render partial: 'admin/pages/partials/performance', :locals => { :performance => performance, :locations => FestivityLocationPage.all }
    else
      render status: :bad_request
    end

  end

  def destroy
    performance = FestivityPerformance.find(params[:id])
    page_id = performance.festivity_event_page.id
    if performance.destroy
      render partial: 'admin/pages/partials/performances_table', :locals => { :performances => FestivityEventPage.find(page_id).festivity_performances, :page_id => page_id, locations: FestivityLocationPage.all}
    end
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
trusty-festivity-extension-2.1.1 app/controllers/admin/festivity_performances_controller.rb
trusty-festivity-extension-2.1.0 app/controllers/admin/festivity_performances_controller.rb
trusty-festivity-extension-2.0.7 app/controllers/admin/festivity_performances_controller.rb
trusty-festivity-extension-2.0.6 app/controllers/admin/festivity_performances_controller.rb
trusty-festivity-extension-2.0.5 app/controllers/admin/festivity_performances_controller.rb
trusty-festivity-extension-2.0.4 app/controllers/admin/festivity_performances_controller.rb
trusty-festivity-extension-2.0.3 app/controllers/admin/festivity_performances_controller.rb
trusty-festivity-extension-2.0.2 app/controllers/admin/festivity_performances_controller.rb
trusty-festivity-extension-2.0.1 app/controllers/admin/festivity_performances_controller.rb
trusty-festivity-extension-2.0.0 app/controllers/admin/festivity_performances_controller.rb