osem-fcy/app/models
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
..
concerns Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
.gitkeep First checkin 2013-01-07 09:04:09 +01:00
ability.rb Avoid the use of :pluck on not_signed abilities 2019-07-16 22:24:20 -07:00
admin_ability.rb Enable registration to proceed without requiring a ticket. 2019-02-16 00:53:40 +01:00
answer.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
application_record.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
booth.rb Rubocop autocorrections 2018-11-16 09:06:05 -08:00
booth_request.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
cfp.rb Adopt more specs to the shoulda-matchers update 2019-02-19 20:50:09 +01:00
comment.rb Rubocop autocorrections 2018-11-16 09:06:05 -08:00
commercial.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
conference.rb Drop halt_callback_chains_on_return_false 2019-05-05 09:40:49 +02:00
contact.rb Rubocop autocorrections 2018-11-16 09:06:05 -08:00
difficulty_level.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
email_settings.rb Rubocop autocorrections 2018-11-16 09:06:05 -08:00
event.rb Use chartkick globally 2018-12-30 16:57:22 -08:00
event_schedule.rb Rubocop autocorrections 2018-11-16 09:06:05 -08:00
event_type.rb Rubocop autocorrections 2018-11-16 09:06:05 -08:00
event_user.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
events_registration.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
lodging.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
openid.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
organization.rb Rubocop autocorrections 2018-11-16 09:06:05 -08:00
payment.rb Rubocop autocorrections 2018-11-16 09:06:05 -08:00
physical_ticket.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
program.rb Drop halt_callback_chains_on_return_false 2019-05-05 09:40:49 +02:00
qanswer.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
question.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
question_type.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
registration.rb Merge pull request #2374 from openSUSE/depfu/update/shoulda-matchers-4.0.1 2019-06-03 09:23:52 +02:00
registration_period.rb Use Ruby safe navigation over Rails try 2018-06-01 09:15:57 -07:00
resource.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
role.rb Drop halt_callback_chains_on_return_false 2019-05-05 09:40:49 +02:00
room.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
schedule.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
splashpage.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
sponsor.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
sponsorship_level.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
subscription.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
survey.rb Rubocop autocorrections 2018-11-16 09:06:05 -08:00
survey_question.rb Add more options for surveys 2018-07-03 08:46:15 +03:00
survey_reply.rb Add more options for surveys 2018-07-03 08:46:15 +03:00
survey_submission.rb Add more options for surveys 2018-07-03 08:46:15 +03:00
ticket.rb Enable registration to proceed without requiring a ticket. 2019-02-16 00:53:40 +01:00
ticket_purchase.rb Rubocop autocorrections 2018-11-16 09:06:05 -08:00
ticket_scanning.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
track.rb Change initial state to new 2019-02-15 17:09:03 +01:00
user.rb Define ticket_purchases before through association 2019-05-05 09:40:50 +02:00
users_role.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
vchoice.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
vday.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
venue.rb Rubocop autocorrections 2018-11-16 09:06:05 -08:00
vote.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
vposition.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00