mirror of
https://github.com/kbparagua/paloma
synced 2023-03-27 23:21:17 -04:00
Fix FilterScope constructor
This commit is contained in:
parent
6e3788adb6
commit
8d4acaaf3a
1 changed files with 2 additions and 5 deletions
7
vendor/assets/javascripts/paloma_core.js
vendored
7
vendor/assets/javascripts/paloma_core.js
vendored
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue