Permalink
Browse files

create assets

  • Loading branch information...
1 parent 707dbf1 commit dd31f1c2d321a290d0bbb530313c5524a338a942 Сергей committed Feb 7, 2012
File renamed without changes
File renamed without changes
File renamed without changes.
View
@@ -2,7 +2,7 @@
module SpreeReviews
-
+
class AbilityDecorator
include CanCan::Ability
@@ -20,6 +20,11 @@ class Engine < Rails::Engine
config.autoload_paths += %W(#{config.root}/lib)
+
+ initializer :assets do |config|
+ Rails.application.config.assets.precompile += %w( reviews.css jquery.rating.js )
+ end
+
def self.activate
Dir.glob(File.join(File.dirname(__FILE__), "../app/**/*_decorator*.rb")) do |c|
Rails.env.production? ? require(c) : load(c)
@@ -1,25 +0,0 @@
-namespace :spree_reviews do
- desc "Copies all migrations and assets (NOTE: This will be obsolete with Rails 3.1)"
- task :install do
- Rake::Task['spree_reviews:install:migrations'].invoke
- Rake::Task['spree_reviews:install:assets'].invoke
- end
-
- namespace :install do
- desc "Copies all migrations (NOTE: This will be obsolete with Rails 3.1)"
- task :migrations do
- source = File.join(File.dirname(__FILE__), '..', '..', 'db')
- destination = File.join(Rails.root, 'db')
- puts "INFO: Mirroring assets from #{source} to #{destination}"
- Spree::FileUtilz.mirror_files(source, destination)
- end
-
- desc "Copies all assets (NOTE: This will be obsolete with Rails 3.1)"
- task :assets do
- source = File.join(File.dirname(__FILE__), '..', '..', 'public')
- destination = File.join(Rails.root, 'public')
- puts "INFO: Mirroring assets from #{source} to #{destination}"
- Spree::FileUtilz.mirror_files(source, destination)
- end
- end
-end

0 comments on commit dd31f1c

Please sign in to comment.