Sha256: 0bff09504fef2897eea1c5922c68e8b27c6f41871266e618efb68146c6a93e4d

Contents?: true

Size: 501 Bytes

Versions: 6

Compression:

Stored size: 501 Bytes

Contents

module Gaku
  class Admin::SchoolYearsController < Admin::BaseController

    load_and_authorize_resource class: SchoolYear

    respond_to :js, :html

    inherit_resources

    before_filter :count, only: %i(create destroy index)

    protected

    def resource_params
      return [] if request.get?
      [params.require(:school_year).permit(attributes)]
    end

    private

    def count
      @count = SchoolYear.count
    end

    def attributes
      %i(starting ending)
    end

  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
gaku_core-0.0.3 app/controllers/gaku/admin/school_years_controller.rb
gaku-0.0.3 core/app/controllers/gaku/admin/school_years_controller.rb
gaku-0.0.2 core/app/controllers/gaku/admin/school_years_controller.rb
gaku_core-0.0.2 app/controllers/gaku/admin/school_years_controller.rb
gaku-0.0.1 core/app/controllers/gaku/admin/school_years_controller.rb
gaku_core-0.0.1 app/controllers/gaku/admin/school_years_controller.rb