Make automatic helpers smarter. Fixes #510

This commit is contained in:
Thomas Reynolds 2012-07-04 11:29:00 -07:00
parent be2589de0d
commit df31f65522
4 changed files with 4 additions and 4 deletions

View file

@ -1,3 +1,3 @@
module ThreeHelper
module Derp
def three; "Three"; end
end

View file

@ -1,3 +1,3 @@
module FourHelper
module FourHelpers
def four; "Four"; end
end

View file

@ -1,3 +1,3 @@
module TwoHelper
module YetAnotherThingy
def two; "Two"; end
end

View file

@ -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