Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated to work with Rails 3/Cms 3.3

  • Loading branch information...
commit a63dd888896e4fd02fdf4d59cab806d844aee33b 1 parent 2f1d46d
@peakpg peakpg authored
View
2  app/views/cms/news_articles/render.html.erb
@@ -1,2 +1,2 @@
<h2><%=h @content_block.name %></h2>
-<p><%= @content_block.body %></p>
+<p><%= @content_block.body.html_safe %></p>
View
4 bcms_news.gemspec
@@ -35,7 +35,9 @@ Gem::Specification.new do |s|
"db/migrate/20090410193313_create_news_articles.rb",
"lib/bcms_news.rb",
"lib/bcms_news/engine.rb",
- "lib/bcms_news/routes.rb"
+ "lib/bcms_news/routes.rb",
+ "lib/generators/bcms_news/install/USAGE",
+ "lib/generators/bcms_news/install/install_generator.rb"
]
s.homepage = %q{http://browsercms.org}
s.require_paths = ["lib"]
View
5 lib/bcms_news/engine.rb
@@ -1,10 +1,7 @@
-require 'rails'
require 'browsercms'
-module News
+module BcmsNews
class Engine < Rails::Engine
include Cms::Module
- puts "I'm the News::Engine"
end
-
end
View
10 lib/generators/bcms_news/install/USAGE
@@ -0,0 +1,10 @@
+Description:
+ Installs the bcms_news module.
+
+Example:
+ rails generate bcms_news:install
+
+ This will:
+ Copy the migrations from the gem into the project.
+ Add the routes to the config/routes.rb
+
View
8 lib/generators/bcms_news/install/install_generator.rb
@@ -0,0 +1,8 @@
+require 'cms/module_installation'
+
+class BcmsNews::InstallGenerator < Cms::ModuleInstallation
+ add_migrations_directory_to_source_root __FILE__
+
+ copy_migration_file '20090410193313_create_news_articles.rb'
+
+end
View
5 lib/tasks/build_gem.rake
@@ -17,9 +17,10 @@ begin
gemspec.files += Dir["app/views/portlets/**/*"]
gemspec.files += Dir["db/migrate/*.rb"]
gemspec.files -= Dir["db/migrate/*_browsercms_*.rb"]
+ gemspec.files += Dir["lib/**/*"]
gemspec.files -= Dir["lib/tasks/build_gem.rake"] # Remove this from packaging in gem
- gemspec.files += Dir["lib/bcms_news.rb"]
- gemspec.files += Dir["lib/bcms_news/*"]
+
+
end
rescue LoadError
puts "Jeweler not available. Install it with: gem install jeweler"
Please sign in to comment.
Something went wrong with that request. Please try again.