export_from_provider(url)
end
+ rescue_from Pettanr::NotWork, :with => :render_not_work
+ def render_not_work(exception = nil)
+ if exception
+ logger.info "Rendering , :: #{exception.message}"
+ end
+ respond_to do |format|
+ format.html {
+ render :file => "#{Rails.root}/public/not_work.html", :layout => false
+ }
+ format.json {
+ render :text => "400 Not work", :status => 400
+ }
+ end
+ end
+
if Rails.env == 'production'
rescue_from ActiveRecord::RecordNotFound, :with => :render_404
rescue_from ActiveRecord::Forbidden, :with => :render_403