diff --git a/Gemfile.lock b/Gemfile.lock index 9319d8b96d1..fba7b391c98 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -446,8 +446,7 @@ GEM mime-types (>= 1.16, < 4.0) netrc (~> 0.8) retriable (3.1.2) - rexml (3.3.6) - strscan + rexml (3.3.9) rollbar (3.5.2) rss (0.3.0) rexml @@ -536,7 +535,6 @@ GEM unicode_utils (~> 1.4) strings-ansi (0.2.0) stripe (10.1.0) - strscan (3.1.0) syntax_suggest (1.1.0) temple (0.10.3) thor (1.3.0) diff --git a/README.md b/README.md index 67c06147128..c3e06902a77 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ $ rails test:all ### 普通のブラウザーでテスト ``` -$ HEADFULL=1 rails test:all +$ HEADFUL=1 rails test:all ``` ### 並列実行せずにテスト diff --git a/app/components/calendar/nico_nico_calendar_component.html.slim b/app/components/calendar/nico_nico_calendar_component.html.slim index 15b3ec1db7a..c55b44be63d 100644 --- a/app/components/calendar/nico_nico_calendar_component.html.slim +++ b/app/components/calendar/nico_nico_calendar_component.html.slim @@ -4,7 +4,7 @@ | ニコニコカレンダー hr.a-border-tint .card-body - .card__description + .card-body__description .niconico-calendar-nav - if prev_month?(current_date) = link_to prev_month_path do diff --git a/app/controllers/api/reading_circles_controller.rb b/app/controllers/api/reading_circles_controller.rb new file mode 100644 index 00000000000..a3e8188844c --- /dev/null +++ b/app/controllers/api/reading_circles_controller.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class API::ReadingCirclesController < API::BaseController + def index + @reading_circles = RegularEvent.category_reading_circle + .where(wip: false) + .order(updated_at: :desc, id: :desc) + end +end diff --git a/app/controllers/regular_events/participations_controller.rb b/app/controllers/regular_events/participations_controller.rb index 4e4bae86e09..b17e4418251 100644 --- a/app/controllers/regular_events/participations_controller.rb +++ b/app/controllers/regular_events/participations_controller.rb @@ -11,7 +11,12 @@ def create end def destroy - @regular_event.cancel_participation(current_user) + if params[:participant_id] && current_user.admin? + user = User.find(params[:participant_id]) + @regular_event.cancel_participation(user) + else + @regular_event.cancel_participation(current_user) + end redirect_to regular_event_path(@regular_event), notice: '参加を取り消しました。' end diff --git a/app/javascript/components/User.jsx b/app/javascript/components/User.jsx index 0680308695e..4b1e7d7bd5a 100644 --- a/app/javascript/components/User.jsx +++ b/app/javascript/components/User.jsx @@ -24,7 +24,7 @@ export default function User({ user, currentUser }) { const roleClass = () => `is-${user.primary_role}` return ( -