Run rubocop --fix-layout and remove encoding comments
This commit is contained in:
parent
fa63e6e81d
commit
ea2862fdef
283 changed files with 1164 additions and 1969 deletions
|
|
@ -2,6 +2,7 @@ module FoodsoftMessages
|
|||
class Engine < ::Rails::Engine
|
||||
def navigation(primary, context)
|
||||
return unless FoodsoftMessages.enabled?
|
||||
|
||||
unless primary[:foodcoop].nil?
|
||||
sub_nav = primary[:foodcoop].sub_navigation
|
||||
sub_nav.items <<
|
||||
|
|
|
|||
|
|
@ -1,23 +1,19 @@
|
|||
module FoodsoftMessages
|
||||
|
||||
module UserLink
|
||||
def self.included(base) # :nodoc:
|
||||
base.class_eval do
|
||||
|
||||
# modify user presentation link to writing a message for the user
|
||||
def show_user_link(user=@current_user)
|
||||
def show_user_link(user = @current_user)
|
||||
if user.nil? || !FoodsoftMessages.enabled?
|
||||
show_user user
|
||||
else
|
||||
link_to show_user(user), new_message_path('message[mail_to]' => user.id),
|
||||
:title => I18n.t('helpers.messages.write_message')
|
||||
:title => I18n.t('helpers.messages.write_message')
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# modify existing helper
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue