diff --git a/app/views/admin/layouts/box.html.haml b/app/views/admin/layouts/box.html.haml
index d65ae2e7..b24ed23d 100644
--- a/app/views/admin/layouts/box.html.haml
+++ b/app/views/admin/layouts/box.html.haml
@@ -12,7 +12,7 @@
= yield :head
- %body{ :class => @controller.controller_name }
+ %body{ :class => controller.controller_name }
#wrapper
#light.container
#panel.container
diff --git a/lib/locomotive/import/content_types.rb b/lib/locomotive/import/content_types.rb
index d48febed..dd36827e 100644
--- a/lib/locomotive/import/content_types.rb
+++ b/lib/locomotive/import/content_types.rb
@@ -37,7 +37,7 @@ module Locomotive
end
def build_content_type(data)
- attributes = { :order_by => '_position_in_list', :group_by_field_name => data.delete('group_by') }.merge(data)
+ attributes = { :group_by_field_name => data.delete('group_by') }.merge(data)
attributes.delete_if { |name, value| %w{fields contents}.include?(name) }
@@ -93,6 +93,8 @@ module Locomotive
end
def set_order_by_value(content_type)
+ self.log "order by #{content_type.order_by}"
+
order_by = (case content_type.order_by
when 'manually', '_position_in_list' then '_position_in_list'
when 'date', 'updated_at' then 'updated_at'
@@ -100,6 +102,8 @@ module Locomotive
content_type.content_custom_fields.detect { |f| f._alias == content_type.order_by }._name rescue nil
end)
+ self.log "order by (after) #{order_by}"
+
content_type.order_by = order_by || '_position_in_list'
end
diff --git a/spec/lib/locomotive/liquid/filters/html_spec.rb b/spec/lib/locomotive/liquid/filters/html_spec.rb
index ce95f18d..5dc068c8 100644
--- a/spec/lib/locomotive/liquid/filters/html_spec.rb
+++ b/spec/lib/locomotive/liquid/filters/html_spec.rb
@@ -45,12 +45,12 @@ describe Locomotive::Liquid::Filters::Html do
javascript_tag('/trash/main').should == result
end
- it 'should return an image tag without paramaters' do
- image_tag('foo.jpg').should == ""
+ it 'should return an image tag without parameters' do
+ image_tag('foo.jpg').should == ""
end
it 'should return an image tag with size' do
- image_tag('foo.jpg', 'width:100', 'height:50').should == ""
+ image_tag('foo.jpg', 'width:100', 'height:50').should == ""
end
it 'should return a flash tag without parameters' do
diff --git a/spec/lib/locomotive/liquid/tags/paginate_spec.rb b/spec/lib/locomotive/liquid/tags/paginate_spec.rb
index 10bbcc09..d8a1ecd8 100644
--- a/spec/lib/locomotive/liquid/tags/paginate_spec.rb
+++ b/spec/lib/locomotive/liquid/tags/paginate_spec.rb
@@ -53,7 +53,9 @@ describe Locomotive::Liquid::Tags::Paginate do
{
'projects' => options.has_key?(:collection) ? options[:collection] : PaginatedCollection.new(['Ruby on Rails', 'jQuery', 'mongodb', 'Liquid', 'sqlite3']),
'current_page' => options[:page] || 1
- }, {}, true)
+ }, {
+ :page => Factory.build(:page)
+ }, true)
end
def default_template