finish to merge + tweak minor stuff

This commit is contained in:
dinedine 2010-10-14 16:01:18 +02:00
parent 282fbb7244
commit 3863272ced
8 changed files with 11 additions and 12 deletions

View File

@ -1,4 +1,4 @@
sou rce :rubygems
source :rubygems
# add in all the runtime dependencies

View File

@ -94,7 +94,7 @@ GEM
delayed_job_mongoid (1.0.0.rc)
delayed_job (~> 2.1)
mongoid (~> 2.0)
devise (1.1.2)
devise (1.1.3)
bcrypt-ruby (~> 2.1.2)
warden (~> 0.10.7)
diff-lcs (1.1.2)
@ -236,7 +236,7 @@ DEPENDENCIES
database_cleaner
delayed_job (= 2.1.0.pre2)
delayed_job_mongoid (= 1.0.0.rc)
devise (= 1.1.2)
devise (= 1.1.3)
factory_girl_rails
fastthread
formtastic (>= 1.1.0)

View File

@ -20,7 +20,7 @@ module Admin::PagesHelper
def parent_pages_options
roots = current_site.pages.roots.where(:slug.ne => '404').and(:_id.ne => @page.id)
returning [] do |list|
[].tap do |list|
roots.each do |page|
list = add_children_to_options(page, list)
end

View File

@ -7,7 +7,7 @@ class ThemeAssetUploader < AssetUploader
process :set_width_and_height
def store_dir
File.join('sites', model.site_id.to_s, 'theme', model.folder_was || model.folder)
File.join('sites', (model.site_id_was || model.site_id).to_s, 'theme', model.folder_was || model.folder)
end
def stale_model?

View File

@ -8,7 +8,7 @@
%p!= t('.help')
%ul{ :id => 'import-steps', :class => 'list', :'data-url' => admin_import_url(:json), :'data-success-message' => t('.message.success'), :'data-failure-message' => t('.message.failure') }
%ul{ :id => 'import-steps', :class => 'list', :'data-url' => admin_import_url(:json), :'data-success-message' => t('.messages.success'), :'data-failure-message' => t('.messages.failure') }
- %w(site content_types assets asset_collections snippets pages).each do |step|
%li{ :id => "#{step}-step" }
%em

View File

@ -287,8 +287,6 @@ en:
attributes: Attributes
upload: Upload
labels:
page:
raw_template: Template
theme_asset:
new:
source: File

View File

@ -18,7 +18,7 @@ Scenario: Creating a valid page
And I fill in "Title" with "Test"
And I fill in "Slug" with "test"
And I select "Home page" from "Parent"
And I fill in "Template" with "Lorem ipsum...."
And I fill in "Raw template" with "Lorem ipsum...."
And I press "Create"
Then I should see "Page was successfully created."
And I should have "Lorem ipsum...." in the test page
@ -27,7 +27,7 @@ Scenario: Updating a valid page
When I go to pages
And I follow "Home page"
And I fill in "Title" with "Home page !"
And I fill in "Template" with "My new content is here"
And I fill in "Raw template" with "My new content is here"
And I press "Update"
Then I should see "Page was successfully updated."
And I should have "My new content is here" in the index page

View File

@ -120,8 +120,9 @@ describe Page do
it 'should add sub pages' do
child_2 = Factory(:page, :title => 'Subpage 2', :slug => 'bar', :parent => @home, :site => @home.site)
Page.first.children.count.should == 2
Page.first.children.should == [@child_1, child_2]
@home = Page.find(@home.id)
@home.children.count.should == 2
@home.children.should == [@child_1, child_2]
end
it 'should move its children accordingly' do