diff options
| author | Teddy Wing | 2017-06-19 17:28:27 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2017-06-19 17:42:05 +0200 | 
| commit | 4e81e22aff65221316c1528a3f2fa82272345c65 (patch) | |
| tree | 43ee11f3325e27a3f4457fbf8f4fa0e4f7f2dc34 /app/controllers/calendars_controller.rb | |
| parent | 7fe8b7d100e92060a14f7c7bc32a097947dd860e (diff) | |
| download | chouette-core-4e81e22aff65221316c1528a3f2fa82272345c65.tar.bz2 | |
Calendars#show: Use #action_links to render header buttons
To abstract the links and make them reusable in other contexts, render
the buttons in the header from `CalendarDecorator#action_links`.
Refs #3479
Diffstat (limited to 'app/controllers/calendars_controller.rb')
| -rw-r--r-- | app/controllers/calendars_controller.rb | 4 | 
1 files changed, 4 insertions, 0 deletions
| diff --git a/app/controllers/calendars_controller.rb b/app/controllers/calendars_controller.rb index 86d567882..432e528f0 100644 --- a/app/controllers/calendars_controller.rb +++ b/app/controllers/calendars_controller.rb @@ -5,6 +5,10 @@ class CalendarsController < BreadcrumbController    respond_to :html    respond_to :js, only: :index +  def show +    @calendar = @calendar.decorate +  end +    private    def calendar_params      permitted_params = [:id, :name, :short_name, periods_attributes: [:id, :begin, :end, :_destroy], date_values_attributes: [:id, :value, :_destroy]] | 
