Compare commits

...

36 Commits

Author SHA1 Message Date
Daniel O'Connor
13e8e2747b Merge branch 'dev' into Style/SoleNestedConditional 2024-07-13 15:14:57 +09:30
Daniel O'Connor
de6241b728 Style/SoleNestedConditional 2024-07-13 05:19:31 +00:00
Daniel O'Connor
5b5adad6ab Merge branch 'dev' into ruby32-rubocop 2024-07-13 14:47:27 +09:30
Daniel O'Connor
269e1d274a Regenerate 2024-07-13 05:03:38 +00:00
Daniel O'Connor
327eaf7a03 More rubocop 2024-07-13 04:57:20 +00:00
Daniel O'Connor
c73d23fa80 Rubocop 2024-07-13 04:55:09 +00:00
Daniel O'Connor
a1e73f4b19 Update rubocop 2024-07-13 04:52:16 +00:00
Daniel O'Connor
212ed17d60 Regenerate 2024-07-13 04:50:26 +00:00
Daniel O'Connor
943929b769 3 space indent 2024-07-13 04:40:43 +00:00
Daniel O'Connor
1f220164bb Pin to 2.4.22 2024-07-13 04:38:00 +00:00
Daniel O'Connor
fc0c428799 Merge branch 'dev' into ruby32 2024-07-13 13:56:44 +09:30
Daniel O'Connor
653776ae6b Fix spec 2024-07-13 04:14:34 +00:00
Daniel O'Connor
ba7d9e6905 Update spec 2024-07-13 03:55:13 +00:00
Daniel O'Connor
f8aff18492 Fix spec 2024-07-13 03:53:41 +00:00
Daniel O'Connor
8bfa81990c Update .devcontainer/.env 2024-07-13 13:06:02 +09:30
Daniel O'Connor
4ed7ea32b5 Merge branch 'dev' into ruby32 2024-07-13 13:04:28 +09:30
Daniel O'Connor
44f864eace Merge branch 'dev' into ruby32 2024-01-27 00:40:07 +10:30
Daniel O'Connor
a762a87d58 Update .env 2024-01-22 00:06:05 +10:30
Daniel O'Connor
4ea77fb52f Update app/views/plantings/index.rss.haml 2024-01-22 00:03:34 +10:30
Daniel O'Connor
56348b1a8e Merge branch 'dev' into ruby32 2024-01-21 19:06:27 +10:30
Daniel O'Connor
82971d773c Update app/views/members/show.html.haml 2023-08-20 16:58:19 +09:30
Daniel O'Connor
3af5b4a53a Merge branch 'dev' into ruby32 2023-08-20 16:57:15 +09:30
Daniel O'Connor
75571a485d Swap to will paginate successor for bootstrap 2023-08-20 02:35:02 +00:00
Daniel O'Connor
8a9137e62e Fix deprecation warning by explicitly calling to_fs 2023-08-20 02:30:00 +00:00
Daniel O'Connor
ec3c010410 Fix deprecation warning by explicitly calling to_fs 2023-08-20 02:25:09 +00:00
Daniel O'Connor
2bfd077190 Fix deprecation warning by explicitly calling to_fs 2023-08-20 02:23:01 +00:00
Daniel O'Connor
b7a7b03029 Merge branch 'dev' into ruby32 2023-08-20 11:30:13 +09:30
Daniel O'Connor
7a470f9fac Appease codeclimate for the nth time 2023-08-11 07:07:50 +00:00
Daniel O'Connor
1dc98da520 Adjust ownership 2023-08-11 07:05:02 +00:00
Daniel O'Connor
1540a3c1e1 Merge branch 'remove-js-routes' into ruby32 2023-08-11 06:54:58 +00:00
Daniel O'Connor
fb322a6a80 Remove 2023-08-11 06:54:42 +00:00
Daniel O'Connor
b15f39dd09 Merge branch 'remove-js-routes' into ruby32 2023-08-11 06:53:44 +00:00
Daniel O'Connor
54211a8cef Remove js-routes 2023-08-11 06:51:39 +00:00
Daniel O'Connor
e55b85c559 Upgrade to js-routes 2. Put all js routes into a global namespace. 2023-08-11 06:36:48 +00:00
Daniel O'Connor
121548df57 Fix creation 2023-08-11 05:56:30 +00:00
Daniel O'Connor
1918884540 Ruby 3.2/Bundler 2.4 2023-08-11 05:45:54 +00:00
3 changed files with 10 additions and 20 deletions

View File

@@ -889,14 +889,6 @@ Style/RedundantReturn:
Exclude:
- 'app/controllers/messages_controller.rb'
# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowModifier.
Style/SoleNestedConditional:
Exclude:
- 'app/controllers/application_controller.rb'
- 'app/controllers/messages_controller.rb'
# Offense count: 24
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: Mode.

View File

@@ -14,13 +14,13 @@ class ApplicationController < ActionController::Base
rescue_from ActiveRecord::RecordNotFound, with: :not_found
def store_location
unless request.path.in?(["/members/sign_in",
"/members/sign_up",
"/members/password/new",
"/members/password/edit",
"/members/confirmation",
"/members/sign_out"]) || request.xhr?
store_location_for(:member, request.fullpath) if request.format == :html
if !(request.path.in?(["/members/sign_in",
"/members/sign_up",
"/members/password/new",
"/members/password/edit",
"/members/confirmation",
"/members/sign_out"]) || request.xhr?) && (request.format == :html)
store_location_for(:member, request.fullpath)
end
end

View File

@@ -8,11 +8,9 @@ class MessagesController < ApplicationController
end
def show
if (@message = Message.find_by(id: params[:id])) && (@conversation = @message.conversation)
if @conversation.is_participant?(current_member)
redirect_to conversation_path(@conversation, box: @box, anchor: "message_" + @message.id.to_s)
return
end
if (@message = Message.find_by(id: params[:id])) && (@conversation = @message.conversation) && @conversation.is_participant?(current_member)
redirect_to conversation_path(@conversation, box: @box, anchor: "message_" + @message.id.to_s)
return
end
redirect_to conversations_path(box: @box)
end