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,13 +2,14 @@ module FoodsoftWiki
|
|||
class Engine < ::Rails::Engine
|
||||
def navigation(primary, ctx)
|
||||
return unless FoodsoftWiki.enabled?
|
||||
|
||||
primary.item :wiki, I18n.t('navigation.wiki.title'), '#', id: nil do |subnav|
|
||||
subnav.item :wiki_home, I18n.t('navigation.wiki.home'), ctx.wiki_path, id: nil
|
||||
subnav.item :all_pages, I18n.t('navigation.wiki.all_pages'), ctx.all_pages_path, id: nil
|
||||
end
|
||||
# move this last added item to just after the foodcoop menu
|
||||
if i = primary.items.index(primary[:foodcoop])
|
||||
primary.items.insert(i+1, primary.items.delete_at(-1))
|
||||
primary.items.insert(i + 1, primary.items.delete_at(-1))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -1,20 +1,16 @@
|
|||
module FoodsoftWiki
|
||||
|
||||
module Mailer
|
||||
def self.included(base) # :nodoc:
|
||||
base.class_eval do
|
||||
|
||||
# modify user presentation link to writing a message for the user
|
||||
def additonal_welcome_text(user)
|
||||
if FoodsoftWiki.enabled? && (page = Page.welcome_mail)
|
||||
page.body
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# modify existing helper
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
module FoodsoftWiki
|
||||
class WikiParser < WikiCloth::Parser
|
||||
|
||||
template do |template|
|
||||
Foodsoft::ExpansionVariables.get(template)
|
||||
end
|
||||
|
|
@ -31,12 +30,11 @@ module FoodsoftWiki
|
|||
super(render_options)
|
||||
end
|
||||
|
||||
|
||||
private
|
||||
|
||||
def link_attributes_if_number_sign_contained_in_nonexistent(page, referer)
|
||||
# Interpret the part after the last number sign as anchor.
|
||||
arr = page.split('#', -1)# `-1` preserves empty anchor
|
||||
arr = page.split('#', -1) # `-1` preserves empty anchor
|
||||
page = arr[0...-1].join('#')
|
||||
anchor = arr[-1]
|
||||
|
||||
|
|
@ -52,9 +50,8 @@ module FoodsoftWiki
|
|||
end
|
||||
end
|
||||
|
||||
def url_for(path_name, options={})
|
||||
Rails.application.routes.url_helpers.send path_name, options.merge({foodcoop: FoodsoftConfig.scope})
|
||||
def url_for(path_name, options = {})
|
||||
Rails.application.routes.url_helpers.send path_name, options.merge({ foodcoop: FoodsoftConfig.scope })
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue