improve the with_scope tag based on the work on the editor
This commit is contained in:
parent
ce24270948
commit
718b3c67bb
@ -23,9 +23,9 @@ module Locomotive
|
||||
def decode(attributes, context)
|
||||
attributes.each_pair do |key, value|
|
||||
attributes[key] = (case value
|
||||
when /true|false/ then value == 'true'
|
||||
when /[0-9]+/ then value.to_i
|
||||
when /'(\S+)'/ then $1
|
||||
when /^true|false$/i then value == 'true'
|
||||
when /^[0-9]+$/ then value.to_i
|
||||
when /^["|'](.+)["|']$/ then $1.gsub(/^["|']/, '').gsub(/["|']$/, '')
|
||||
else
|
||||
context[value]
|
||||
end)
|
||||
|
@ -52,7 +52,6 @@ describe ContentInstance do
|
||||
end
|
||||
|
||||
it 'should find previous item when available' do
|
||||
puts @second.previous
|
||||
@second.previous.custom_field_1.should == "first"
|
||||
@second.previous._position_in_list.should == 0
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user