app/metal/create_admin_user.rb in spree-0.9.4 vs app/metal/create_admin_user.rb in spree-0.10.0.beta
- old
+ new
@@ -3,10 +3,10 @@
# note: we're not returning 404 in the usuaul sense - it actually just tells rails to continue metal chain
class CreateAdminUser
def self.call(env)
- if env["PATH_INFO"] =~ /^\/users/ or @admin_defined or not User.table_exists?
+ if env["PATH_INFO"] =~ /^\/users|stylesheets/ or @admin_defined or not User.table_exists?
@status = [404, {"Content-Type" => "text/html"}, "Not Found"]
else
@admin_defined = User.first(:include => :roles, :conditions => ["roles.name = 'admin'"])
@status = [404, {"Content-Type" => "text/html"}, "Not Found"] if @admin_defined
end