Skip to content

Commit

Permalink
Merge pull request TryGhost#2168 from halfdan/deregister
Browse files Browse the repository at this point in the history
Rename unregisterFilter to deregisterFilter
  • Loading branch information
ErisDS committed Feb 10, 2014
2 parents 0dea6a2 + 3993b67 commit 6b4a1ff
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/server/apps/proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var proxy = {

filters: {
register: filters.registerFilter.bind(filters),
unregister: filters.unregisterFilter.bind(filters)
deregister: filters.deregisterFilter.bind(filters)
},
helpers: {
register: helpers.registerThemeHelper.bind(helpers),
Expand Down
4 changes: 2 additions & 2 deletions core/server/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Filters.prototype.registerFilter = function (name, priority, fn) {
};

// Unregister a filter callback function
Filters.prototype.unregisterFilter = function (name, priority, fn) {
Filters.prototype.deregisterFilter = function (name, priority, fn) {
// Curry the priority optional parameter to a default of 5
if (_.isFunction(priority)) {
fn = priority;
Expand Down Expand Up @@ -80,4 +80,4 @@ Filters.prototype.doFilter = function (name, args) {
};

module.exports = new Filters();
module.exports.Filters = Filters;
module.exports.Filters = Filters;
2 changes: 1 addition & 1 deletion core/test/unit/apps_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe('Apps', function () {
it('creates a ghost proxy', function () {
should.exist(appProxy.filters);
should.exist(appProxy.filters.register);
should.exist(appProxy.filters.unregister);
should.exist(appProxy.filters.deregister);

should.exist(appProxy.helpers);
should.exist(appProxy.helpers.register);
Expand Down

0 comments on commit 6b4a1ff

Please sign in to comment.