mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-09-09 12:39:16 -04:00
Compare commits
36
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13e8e2747b | ||
|
|
de6241b728 | ||
|
|
5b5adad6ab | ||
|
|
269e1d274a | ||
|
|
327eaf7a03 | ||
|
|
c73d23fa80 | ||
|
|
a1e73f4b19 | ||
|
|
212ed17d60 | ||
|
|
943929b769 | ||
|
|
1f220164bb | ||
|
|
fc0c428799 | ||
|
|
653776ae6b | ||
|
|
ba7d9e6905 | ||
|
|
f8aff18492 | ||
|
|
8bfa81990c | ||
|
|
4ed7ea32b5 | ||
|
|
44f864eace | ||
|
|
a762a87d58 | ||
|
|
4ea77fb52f | ||
|
|
56348b1a8e | ||
|
|
82971d773c | ||
|
|
3af5b4a53a | ||
|
|
75571a485d | ||
|
|
8a9137e62e | ||
|
|
ec3c010410 | ||
|
|
2bfd077190 | ||
|
|
b7a7b03029 | ||
|
|
7a470f9fac | ||
|
|
1dc98da520 | ||
|
|
1540a3c1e1 | ||
|
|
fb322a6a80 | ||
|
|
b15f39dd09 | ||
|
|
54211a8cef | ||
|
|
e55b85c559 | ||
|
|
121548df57 | ||
|
|
1918884540 |
No files matched your search
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user