Permalink
Browse files

Clearing out unnecessary code

  • Loading branch information...
1 parent 1cf37ce commit 8b496af1aeec8d5e6c19c55515316db14932c9b5 @iloveitaly iloveitaly committed with JDutil Dec 14, 2012
File renamed without changes.
@@ -1,11 +1,3 @@
class Spree::Admin::PagesController < Spree::Admin::ResourceController
-
- def new
- @page = @object
- end
-
- def edit
- @page = @object
- end
-
+
end
View
@@ -44,9 +44,6 @@ def update_positions_and_slug
end
end
- if not_using_foreign_link?
- Rails.cache.delete('page_not_exist/' + self.slug)
- end
return true
end
@@ -1,40 +1,17 @@
-if ::Rails.version < "3.1" || !::Rails.application.config.assets.enabled
- module SpreeStaticContent
- module Generators
- class InstallGenerator < Rails::Generators::Base
-
- def add_migrations
- run 'rake railties:install:migrations FROM=spree_static_content'
- end
-
- def run_migrations
- res = ask "Would you like to run the migrations now? [Y/n]"
- if res == "" || res.downcase == "y"
- run 'rake db:migrate'
- else
- puts "Skiping rake db:migrate, don't forget to run it!"
- end
- end
+module SpreeStaticContent
+ module Generators
+ class InstallGenerator < Rails::Generators::Base
+ def add_migrations
+ run 'rake railties:install:migrations FROM=spree_static_content'
end
- end
- end
-else
- module SpreeStaticContent
- module Generators
- class InstallGenerator < Rails::Generators::Base
- def add_migrations
- run 'rake railties:install:migrations FROM=spree_static_content'
- end
-
- def run_migrations
- res = ask "Would you like to run the migrations now? [Y/n]"
- if res == "" || res.downcase == "y"
- run 'rake db:migrate'
- else
- puts "Skiping rake db:migrate, don't forget to run it!"
- end
- end
+ def run_migrations
+ res = ask "Would you like to run the migrations now? [Y/n]"
+ if res == "" || res.downcase == "y"
+ run 'rake db:migrate'
+ else
+ puts "Skiping rake db:migrate, don't forget to run it!"
+ end
end
end
end
@@ -6,12 +6,8 @@ def self.activate
Dir.glob(File.join(File.dirname(__FILE__), "../../app/**/*_decorator*.rb")) do |c|
Rails.application.config.cache_classes ? require(c) : load(c)
end
- Dir.glob(File.join(File.dirname(__FILE__), "../../app/overrides/**/*.rb")) do |c|
- Rails.application.config.cache_classes ? require(c) : load(c)
- end
-
-
end
+
config.to_prepare &method(:activate).to_proc
config.autoload_paths += %W(#{config.root}/lib)
end
View
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../spec_helper'
+require 'spec_helper'
describe Spree::Page do
before(:each) do

0 comments on commit 8b496af

Please sign in to comment.