app/controllers/uploader/attachments_controller.rb in rails-uploader-0.4.3 vs app/controllers/uploader/attachments_controller.rb in rails-uploader-0.4.4
- old
+ new
@@ -44,10 +44,10 @@
protected
def find_klass
@klass = Uploader.constantize(params[:klass])
- raise ActionController::RoutingError, "Class not found #{params[:klass]}" if @klass.nil?
+ raise ActionController::ParameterMissing.new("klass parameter isn't set but #{params[:klass].inspect}") if @klass.nil?
end
def build_asset
@asset = @klass.new(asset_params)
end