aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/calendars_controller.rb
diff options
context:
space:
mode:
authorXinhui2017-06-02 15:18:13 +0200
committerXinhui2017-06-02 15:18:13 +0200
commit6ae4dc1f2d05f4499245e77680e69a0678c17bc7 (patch)
tree5102e88899e11d77efb25f2ab9b8ae3dbfec3e3e /app/controllers/calendars_controller.rb
parent4dd8b8382d4348d11a31d715362295f0c9cab2fc (diff)
downloadchouette-core-6ae4dc1f2d05f4499245e77680e69a0678c17bc7.tar.bz2
Calendars#index display other organisation shared calendars
Refs #3654
Diffstat (limited to 'app/controllers/calendars_controller.rb')
-rw-r--r--app/controllers/calendars_controller.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/controllers/calendars_controller.rb b/app/controllers/calendars_controller.rb
index 5370d9cbb..86d567882 100644
--- a/app/controllers/calendars_controller.rb
+++ b/app/controllers/calendars_controller.rb
@@ -33,10 +33,8 @@ class CalendarsController < BreadcrumbController
def collection
return @calendars if @calendars
- scope = Calendar.where('organisation_id = ?', current_organisation.id)
-
+ scope = Calendar.where('organisation_id = ? OR shared = ?', current_organisation.id, true)
scope = shared_scope(scope)
-
@q = scope.ransack(params[:q])
calendars = @q.result