1
0
Fork 0
mirror of https://github.com/kbparagua/paloma synced 2023-03-27 23:21:17 -04:00

Fix FilterScope constructor

This commit is contained in:
kbparagua 2013-02-21 23:33:06 +08:00
parent 6e3788adb6
commit 8d4acaaf3a

View file

@ -61,16 +61,14 @@ Paloma._performFilters = function(type, namespace_or_controller_path, action, pa
// FilterScope Class
Paloma.FilterScope = function(name){
this.name = name;
Paloma._filters[this.name] = {};
};
Paloma.FilterScope = function(name){ this.name = name; };
Paloma.FilterScope.prototype.as = function(filterName){
return (new Paloma.Filter(this.name, filterName));
};
// Filter class
Paloma.Filter = function(scope, name){
this.scope = scope;
@ -119,7 +117,6 @@ Paloma.Filter.prototype.perform = function(method){
// Filter Helpers
Paloma.Filter._isApplicable = function(filter, action){
var allActions = filter.actions == 'all',
isQualified = filter.exception == false && filter.actions.indexOf(action) != -1,