Make automatic helpers smarter. Fixes #510
This commit is contained in:
parent
be2589de0d
commit
df31f65522
4 changed files with 4 additions and 4 deletions
|
@ -1,3 +1,3 @@
|
|||
module ThreeHelper
|
||||
module Derp
|
||||
def three; "Three"; end
|
||||
end
|
|
@ -1,3 +1,3 @@
|
|||
module FourHelper
|
||||
module FourHelpers
|
||||
def four; "Four"; end
|
||||
end
|
|
@ -1,3 +1,3 @@
|
|||
module TwoHelper
|
||||
module YetAnotherThingy
|
||||
def two; "Two"; end
|
||||
end
|
|
@ -10,7 +10,7 @@ module Middleman
|
|||
def registered(app)
|
||||
# Setup a default helpers paths
|
||||
app.set :helpers_dir, "helpers"
|
||||
app.set :helpers_filename_glob, "**/*_helper.rb"
|
||||
app.set :helpers_filename_glob, "**/*.rb"
|
||||
app.set :helpers_filename_to_module_name_proc, Proc.new { |filename|
|
||||
basename = File.basename(filename, File.extname(filename))
|
||||
basename.camelcase
|
||||
|
|
Loading…
Reference in a new issue