<commit_before>Meteor Reactive + Filtering Routers
-----------------------------------


A `ReactiveRouter` is a simple beast, it's just a Bootstrap Router with a reactive variable `current_page()`. To set the variable, call `goto()`.

```js
MyRouter = ReactiveRouter.extend({
  routes: {'': 'home'},
  home: function() { this.goto('home'); }
})

MyRouter.current_page(); // might be 'home'
```

A `FilteredRouter` adds filtering capabilities to the string returned by `current_page`. For instance, you could hook into the new Meteor Auth[https://github.com/meteor/meteor/wiki/Getting-started-with-Auth] stuff like so:

```js
MyRouter = FilteredRouter.extend({
  initialize: function() {
    FilteredRouter.prototype.initialize.call(this);
    this.filter(this.require_login, {only: home});
  },
  
  require_login: function(page) {
    if (Meteor.user()) {
      return page;
    } else {
      return 'signin';
    }
  },
  
  routes: {'': 'home'},
  home: function() { this.goto('home'); }
})

MyRouter.current_page(); // might be 'home'
```
<commit_msg>Fixed problem.<commit_after>Meteor Reactive + Filtering Routers
-----------------------------------


A `ReactiveRouter` is a simple beast, it's just a Bootstrap Router with a reactive variable `current_page()`. To set the variable, call `goto()`.

```js
MyRouter = ReactiveRouter.extend({
  routes: {'': 'home'},
  home: function() { this.goto('home'); }
})

Router = new MyRouter();
Router.current_page(); // might be 'home'
```

A `FilteredRouter` adds filtering capabilities to the string returned by `current_page`. For instance, you could hook into the new Meteor Auth[https://github.com/meteor/meteor/wiki/Getting-started-with-Auth] stuff like so:

```js
MyRouter = FilteredRouter.extend({
  initialize: function() {
    FilteredRouter.prototype.initialize.call(this);
    this.filter(this.require_login, {only: home});
  },
  
  require_login: function(page) {
    if (Meteor.user()) {
      return page;
    } else {
      return 'signin';
    }
  },
  
  routes: {'': 'home'},
  home: function() { this.goto('home'); }
})

Router = new MyRouter();
Router.current_page(); // might be 'home' or 'signin'
```

{'fraction_non_alphanumeric': 0.18361711919005982, 'fraction_numerical': 0.0, 'mean_word_length': 3.445807770961145, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2680650', 'n_tokens_mistral': 693, 'n_tokens_neox': 664, 'n_words': 187}