From ea81025d3373c7b3295aa82b30ccb39d0f09d2d6 Mon Sep 17 00:00:00 2001 From: Dirk Kelly Date: Wed, 2 Mar 2011 14:38:32 +0800 Subject: [PATCH] storing default_attribute on the editable_element if a default attribute has been parsed. --- app/models/editable_element.rb | 1 + lib/locomotive/liquid/tags/editable/base.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/app/models/editable_element.rb b/app/models/editable_element.rb index 10321173..60c563c8 100644 --- a/app/models/editable_element.rb +++ b/app/models/editable_element.rb @@ -6,6 +6,7 @@ class EditableElement field :slug field :block field :default_content + field :default_attribute field :hint field :disabled, :type => Boolean, :default => false field :assignable, :type => Boolean, :default => true diff --git a/lib/locomotive/liquid/tags/editable/base.rb b/lib/locomotive/liquid/tags/editable/base.rb index ef6b3813..aaa04c50 100644 --- a/lib/locomotive/liquid/tags/editable/base.rb +++ b/lib/locomotive/liquid/tags/editable/base.rb @@ -26,6 +26,7 @@ module Locomotive :block => @context[:current_block].try(:name), :slug => @slug, :hint => @options[:hint], + :default_attribute => @options[:default], :default_content => default_content, :assignable => @options[:assignable], :disabled => false,