1
0
Fork 0
mirror of https://github.com/middleman/middleman.git synced 2022-11-09 12:20:27 -05:00

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
5 changed files with 6 additions and 6 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 +0,0 @@
module TwoHelper
def two; "Two"; end
end

View file

@ -0,0 +1,3 @@
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