diff options
Diffstat (limited to 'lib/capistrano/refinerycms/helpers.rb')
-rw-r--r-- | lib/capistrano/refinerycms/helpers.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/capistrano/refinerycms/helpers.rb b/lib/capistrano/refinerycms/helpers.rb new file mode 100644 index 0000000..bfafc47 --- /dev/null +++ b/lib/capistrano/refinerycms/helpers.rb @@ -0,0 +1,18 @@ +module Capistrano + module RefineryCMS + module Helpers + + def refinerycms_template(template_name) + f = File.join(fetch(:refinerycms_template_path), 'template_name') + unless File.exists?(f) + default_template_path = File.join(%W{ .. .. generators capistrano refinerycms templates #{ template_name } }) + f = File.expand_path(default_template_path, __FILE__) + end + + template = File.read(f) + StringIO.new(ERB.new(template).result(binding)) + end + + end + end +end
\ No newline at end of file |