lib/condo/engine.rb in condo-1.0.1 vs lib/condo/engine.rb in condo-1.0.2
- old
+ new
@@ -11,15 +11,19 @@
#end
config.autoload_paths << File.expand_path("../../../lib", __FILE__)
+
#
- # Set the proper error types for Rails.
+ # Set the proper error types for Rails and add assets for compilation
#
- initializer "load http errors" do |app|
+ initializer "condo initializer" do |app|
+
config.after_initialize do
+ Rails.application.config.assets.precompile += ['condo/md5/hash.worker.js', 'condo/md5/hash.worker.emulator.js']
+
responses = {
"Condo::Errors::MissingFurniture" => :not_found,
"Condo::Errors::LostTheKeys" => :forbidden,
"Condo::Errors::NotYourPlace" => :unauthorized
}
@@ -27,9 +31,10 @@
rescue_responses.update(responses)
else
ActionDispatch::ShowExceptions.rescue_responses.update(responses) # Rails 3.0/3.1
end
end
+
end
end
end