osem-fcy/app
Espartaco Palma 6421916784
Avoid the use of :pluck on not_signed abilities
When using :pluck, ActiveRecord trigger the query immediately.
The above is a behavior we probably want to avoid, because
implies a query to the database regarless of the role or
permission.

** Before

    osem_1      | 07:39:11 web.1    | Started GET "/" for 172.20.0.1 at 2019-07-1207:39:11 +0000
    osem_1      | 07:39:11 web.1    |    (0.3ms)  SELECT
    "conferences"."custom_domain" FROM "conferences" WHERE
     ("conferences"."custom_domain" IS NOT NULL) ORDER BY start_date DESC
    osem_1      | 07:39:11 web.1    | Processing by ConferencesController#index as HTML
    osem_1      | 07:39:11 web.1    |    (1.3ms)  SELECT "events"."id" FROM
    "events" WHERE "events"."state" = $ 1  [["state", "confirmed"]]
    osem_1      | 07:39:11 web.1    |   ↳ app/models/ability.rb:39:in `not_signed_in'
    osem_1      | 07:39:11 web.1    |   Rendering layouts/application.html.haml
    osem_1      | 07:39:11 web.1    |   Rendering conferences/index.html.haml within layouts/application

** After

    osem_1      | 07:43:18 web.1    | Started GET "/" for 172.20.0.1 at 2019-07-1207:43:18 +0000
    osem_1      | 07:43:19 web.1    |    (0.2ms)  SELECT
    "conferences"."custom_domain" FROM "conferences" WHERE
     ("conferences"."custom_domain" IS NOT NULL) ORDER BY start_date DESC
    osem_1      | 07:43:19 web.1    | Processing by ConferencesController#index as HTML
    osem_1      | 07:43:19 web.1    |   Rendering layouts/application.html.haml
    osem_1      | 07:43:19 web.1    |   Rendering conferences/index.html.haml  within layouts/application
2019-07-16 22:24:20 -07:00
..
assets Merge pull request #2462 from Ana06/carrousel 2019-04-06 10:06:37 +02:00
controllers Fix gigitty link 2019-05-24 15:19:37 +02:00
datatables Convert admin/registrations datatable to AJAX-backed 2018-10-10 21:57:22 +02:00
helpers s/redirect_to :back/redirect_back/ 2019-05-05 09:40:50 +02:00
jobs Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
mailers Rubocop autocorrections 2018-11-16 09:06:05 -08:00
models Avoid the use of :pluck on not_signed abilities 2019-07-16 22:24:20 -07:00
pdfs Gracefully fail out of image handling in ticket PDF 2018-12-19 12:30:45 -08:00
serializers Required changes for consistent controller & feature results 2018-11-20 17:30:56 -08:00
uploaders Uploader changes based on https://github.com/carrierwaveuploader/carrierwave 2018-11-14 13:29:39 -08:00
views Merge pull request #2476 from differentreality/url_helpers_in_switch_checkbox 2019-06-04 17:12:32 +02:00