MiraitSystems/enju_trunk

View on GitHub
app/controllers/medium_of_performances_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
class MediumOfPerformancesController < InheritedResources::Base
  respond_to :html, :json
  before_filter :check_client_ip_address
  load_and_authorize_resource

  def update
    @medium_of_performance = MediumOfPerformance.find(params[:id])
    if params[:move]
      move_position(@medium_of_performance, params[:move])
      return
    end
    update!
  end

  def index
    @medium_of_performances = @medium_of_performances.page(params[:page])
  end
end