When fragment caching is enabled—
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -27 +26,0 @@
- config.action_controller.perform_caching = false
@@ -29 +27,0 @@
- config.cache_store = :null_store
—the test of voting fails with:
expected to find css ".rating.bright" … 3 times but there were no matches
expected to find visible css ".rating:not(.bright)" … 2 times, found 5 matches
# ./spec/features/voting_spec.rb:31
# ./spec/features/voting_spec.rb:30
# ./spec/features/voting_spec.rb:53
i.e. the rating displayed on the event index is not updated after
voting, because while the fragment’s cache dependencies include the
event, voting doesn’t update the event.
re #2767
The logic used for the `:reply` ability incompletely duplicated that of
`Survey#active?` and incorrectly assumed that surveys always have start
and end dates.
Resolves:
Failures:
1) Survey as an attendee respond to a survey during registration
Failure/Error: survey.start_date > Time.current || survey.end_date < Time.current
ActionView::Template::Error:
undefined method `>' for nil:NilClass
survey.start_date > Time.current || survey.end_date < Time.current
^
# ./app/models/ability.rb:126:in `block in signed_in'
# ./app/views/surveys/show.html.haml:28:in `block in _app_views_surveys_show_html_haml___3404959267043700678_138180'
# ./app/views/surveys/show.html.haml:19:in `_app_views_surveys_show_html_haml___3404959267043700678_138180'
Failed examples:
rspec ./spec/features/surveys_spec.rb:37 # Survey as an attendee respond to a survey during registration
Resolves:
Failures:
1) Survey as an organizer create a survey
Failure/Error: click_link 'New'
Capybara::ElementNotFound:
Unable to find link "New"
# ./spec/features/surveys_spec.rb:18:in `block (3 levels) in <top (required)>'
Failed examples:
rspec ./spec/features/surveys_spec.rb:15 # Survey as an organizer create a survey
Resolves failing test `spec/features/versions_spec.rb:344`:
1) Version display changes in users_role for conference role
Failure/Error: expect(page).to have_text("added role cfp with ID #{user_role.id} to user #{user.name} in conference #{conference.short_title}")
expected to find text "added role cfp with ID 2 to user name2 in conference fr_GAQ" in "OSEM\nname1\nAll Conferences\nOrganizations\nRevision History\nAll Conferences\nRevision History\nLog of changes made to conferences and associated resources\nShow\n10\n25\n50\n100\nAll\nentries\nSearch:\nID Description Actions\n18\nname2 signed up less than a minute ago\n(May 1, 2014 00:01)\n\n\n\nView Changes\nRevert\n17\nSomeone (probably via the console) updated is admin of user name1 less than a minute ago\n(May 1, 2014 00:01)\n\n\n\nView Changes\nRevert\n16\nname1 signed up less than a minute ago\n(May 1, 2014 00:01)\n\n\n\nView Changes\nRevert\n15\nSomeone (probably via the console) created new cfp for events in conference fr_GAQ less than a minute ago\n(May 1, 2014 00:01)\n\n\n\nView Changes\nRevert\n14\nSomeone (probably via the console) created new role volunteers_coordinator in conference fr_GAQ less than a minute ago\n(May 1, 2014 00:01)\n\n\n\nView Changes\nRevert\n13\nSomeone (probably via the console) created new role info_desk in conference fr_GAQ less than a minute ago\n(May 1, 2014 00:01)\n\n\n\nView Changes\nRevert\n12\nSomeone (probably via the console) created new role cfp in conference fr_GAQ less than a minute ago\n(May 1, 2014 00:01)\n\n\n\nView Changes\nRevert\n11\nSomeone (probably via the console) created new role organizer in conference fr_GAQ less than a minute ago\n(May 1, 2014 00:01)\n\n\n\nView Changes\nRevert\n10\nSomeone (probably via the console) created new difficulty level Hard in conference fr_GAQ less than a minute ago\n(May 1, 2014 00:01)\n\n\n\nView Changes\nRevert\n9\nSomeone (probably via the console) created new difficulty level Medium in conference fr_GAQ less than a minute ago\n(May 1, 2014 00:01)\n\n\n\nView Changes\nRevert\nShowing 1 to 10 of 16 entries\nFirst\nPrevious\n1\n2\nNext\nLast\nThis tool is free software, released under the MIT license. You can run, copy, distribute, study, change and improve it. The source code and the developers are on GitHub."
# ./spec/features/versions_spec.rb:350:in `block (2 levels) in <top (required)>'
Closes#2560
Active users are needed for selectize, and the active definition changed to show recent users in #2297
This reverts that change, and provides
* active scope (user not disabled)
* recent scope (for use in #2297 changes, ie user distribution)
Admins may want to have discussions or any other general activity
that does not have any particular speaker. Thus, speaker validation
is removed.
Closes https://github.com/openSUSE/osem/issues/2520
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
`attribute_changed?` inside of after callbacks has changed his
behaviour. The new return value will reflect the behavior of calling the
method after `save` returned. To maintain the current behavior, I have
`saved_change_to_attribute?` instead.
Passing string to be evaluated in :if and :unless conditional options is
not supported. Pass a symbol for an instance method, or a lambda, proc
or block, instead.
The modal didn't really work on mobiles. On mobiles you also need the schedule
link because it's hard to point your mobile to a QR code on your mobile...
In the User model, a has_many :through association
'User#physical_tickets' which goes through 'User#ticket_purchases' was
defined before the through association was defined. This doesn't work in
Rails 5.1.
ActiveSupport.halt_callback_chains_on_return_false= is deprecated and
will be removed in Rails 5.2. Stop using it and return `throw(:abort)`
instead in the callbacks which need it.
Requiring a ticket after registration is convoluted; while it may be neccesary
for some workflows, it definitely isn't for others, and the core of osem
doesn't need it... so let's make it optional.