diff options
| author | Alban Peignier | 2018-02-01 22:26:00 +0100 | 
|---|---|---|
| committer | cedricnjanga | 2018-02-07 07:09:26 -0800 | 
| commit | 0fa923fa3ae8b85244be727d7386aaf1b1a69f95 (patch) | |
| tree | 76d7e3ec18f61ef7c2403698e9c91f1593b6d244 | |
| parent | f4bc83da367bd5823b75d4b2fac6807258349972 (diff) | |
| download | chouette-core-0fa923fa3ae8b85244be727d7386aaf1b1a69f95.tar.bz2 | |
Define @year in CalendarsController as expected by view. Refs #5682
| -rw-r--r-- | app/controllers/calendars_controller.rb | 30 | 
1 files changed, 0 insertions, 30 deletions
| diff --git a/app/controllers/calendars_controller.rb b/app/controllers/calendars_controller.rb index d06652569..585851f00 100644 --- a/app/controllers/calendars_controller.rb +++ b/app/controllers/calendars_controller.rb @@ -10,10 +10,6 @@ class CalendarsController < ChouetteController    belongs_to :workgroup -  belongs_to :workgroup - -  belongs_to :workgroup -    def index      index! do        @calendars = decorate_calendars(@calendars) @@ -55,32 +51,6 @@ class CalendarsController < ChouetteController      end    end -  def month -    @date = params['date'] ? Date.parse(params['date']) : Date.today -    @calendar = resource -  end - -  def create -    create! do -      if @calendar.valid? && has_feature?('application_days_on_calendars') -        redirect_to([:edit, @calendar]) -        return -      end -    end -  end - -  def update -    if params[:calendar] -      super -    else -      state  = JSON.parse request.raw_post -      resource.state_update state -      respond_to do |format| -        format.json { render json: state, status: state['errors'] ? :unprocessable_entity : :ok } -      end -    end -  end -    private    def decorate_calendars(calendars) | 
