From 77d7587150c09f56cd337e192ca065f18b3e7584 Mon Sep 17 00:00:00 2001 From: Dirk Kelly Date: Wed, 2 Mar 2011 08:15:54 +0800 Subject: [PATCH] allow inheritable to be sent through as a tag --- lib/locomotive/liquid/tags/editable/base.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/locomotive/liquid/tags/editable/base.rb b/lib/locomotive/liquid/tags/editable/base.rb index b2621185..e359e02f 100644 --- a/lib/locomotive/liquid/tags/editable/base.rb +++ b/lib/locomotive/liquid/tags/editable/base.rb @@ -9,7 +9,7 @@ module Locomotive def initialize(tag_name, markup, tokens, context) if markup =~ Syntax @slug = $1.gsub('\'', '') - @options = {} + @options = { :inheritable => true } markup.scan(::Liquid::TagAttributes) { |key, value| @options[key.to_sym] = value.gsub(/^'/, '').gsub(/'$/, '') } else raise ::Liquid::SyntaxError.new("Syntax Error in 'editable_xxx' - Valid syntax: editable_xxx (, )") @@ -27,6 +27,7 @@ module Locomotive :slug => @slug, :hint => @options[:hint], :default_content => @nodelist.first.to_s, + :inheritable => @options[:inheritable], :disabled => false, :from_parent => false }, document_type)