Updated to latest refinerycms(-blog)

* bundle update
* new migrations
* fixed specs for new behaviour
This commit is contained in:
Marc Remolt
2011-08-12 18:44:00 +02:00
parent d3352df3a5
commit b2700960d8
14 changed files with 139 additions and 95 deletions

View File

@@ -24,4 +24,6 @@ Dummy::Application.configure do
config.action_dispatch.best_standards_support = :builtin
end
Refinery.rescue_not_found = false
Refinery.rescue_not_found = false# When true will use Amazon's Simple Storage Service on your production machine
# instead of the default file system for resources and images
Refinery.s3_backend = !(ENV['S3_KEY'].nil? || ENV['S3_SECRET'].nil?)

View File

@@ -47,4 +47,6 @@ Dummy::Application.configure do
# Send deprecation notices to registered listeners
config.active_support.deprecation = :notify
end
Refinery.rescue_not_found = true
Refinery.rescue_not_found = true# When true will use Amazon's Simple Storage Service on your production machine
# instead of the default file system for resources and images
Refinery.s3_backend = !(ENV['S3_KEY'].nil? || ENV['S3_SECRET'].nil?)

View File

@@ -33,4 +33,6 @@ Dummy::Application.configure do
# Print deprecation notices to the stderr
config.active_support.deprecation = :stderr
end
Refinery.rescue_not_found = false
Refinery.rescue_not_found = false# When true will use Amazon's Simple Storage Service on your production machine
# instead of the default file system for resources and images
Refinery.s3_backend = !(ENV['S3_KEY'].nil? || ENV['S3_SECRET'].nil?)

View File

@@ -0,0 +1,11 @@
class AddCachedSlugs < ActiveRecord::Migration
def self.up
add_column :blog_categories, :cached_slug, :string
add_column :blog_posts, :cached_slug, :string
end
def self.down
remove_column :blog_categories, :cached_slug
remove_column :blog_posts, :cached_slug
end
end

View File

@@ -0,0 +1,9 @@
class AddCustomUrlFieldToBlogPosts < ActiveRecord::Migration
def self.up
add_column :blog_posts, :custom_url, :string
end
def self.down
remove_column :blog_posts, :custom_url
end
end

View File

@@ -0,0 +1,10 @@
class AddCustomTeaserFieldToBlogPosts < ActiveRecord::Migration
def self.up
add_column :blog_posts, :custom_teaser, :text
end
def self.down
remove_column :blog_posts, :custom_teaser
end
end

View File

@@ -10,12 +10,13 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20110602094445) do
ActiveRecord::Schema.define(:version => 20110812162204) do
create_table "blog_categories", :force => true do |t|
t.string "title"
t.datetime "created_at"
t.datetime "updated_at"
t.string "cached_slug"
end
add_index "blog_categories", ["id"], :name => "index_blog_categories_on_id"
@@ -48,6 +49,9 @@ ActiveRecord::Schema.define(:version => 20110602094445) do
t.datetime "created_at"
t.datetime "updated_at"
t.integer "user_id"
t.string "cached_slug"
t.string "custom_url"
t.text "custom_teaser"
end
add_index "blog_posts", ["id"], :name => "index_blog_posts_on_id"

View File

@@ -1,3 +1,12 @@
::Page.reset_column_information
# Check whether all columns are applied yet by seo_meta.
unless !defined?(::SeoMeta) || ::SeoMeta.attributes.keys.all? { |k|
::Page.translation_class.instance_methods.include?(k)
}
# Make pages model seo_meta because not all columns are accessible.
::Page.translation_class.send :is_seo_meta
end
page_position = -1
home_page = Page.create(:title => "Home",