Secure product_categories and add example test for other supplier resources and fix hack attempts included in test

This commit is contained in:
2012-12-06 12:21:38 +01:00
parent 382f91b1d6
commit 180b6deb4d
8 changed files with 207 additions and 8 deletions
+5 -2
View File
@@ -1,10 +1,9 @@
class ApplicationController < ActionController::Base
before_filter :set_locale
layout :layout_by_resource
protect_from_forgery
rescue_from SimplyStored::RecordNotFound, with: :show_404
private
def broadcast_user(uid, event, data = {})
@@ -62,4 +61,8 @@ private
"http://#{Rails.env.production? ? 'events.qwaiter.com' : 'localhost'}:9296/faye"
end
helper_method :event_host
def show_404
render 'dashboard/404', layout: true, status: 404
end
end