<commit_before># Friendly Routes
Friendly Routes creates DSL for creating rails routes with human friendly URLs

[![Code Climate](https://codeclimate.com/github/RoM4iK/friendly_routes/badges/gpa.svg)](https://codeclimate.com/github/RoM4iK/friendly_routes)
[![Build Status](https://travis-ci.org/RoM4iK/friendly_routes.svg?branch=master)](https://travis-ci.org/RoM4iK/friendly_routes)
## Usage
How to use my plugin.

## Installation
Add this line to your application's Gemfile:

```ruby
gem 'friendly_routes'
```

And then execute:
```bash
$ bundle
```

Or install it yourself as:
```bash
$ gem install friendly_routes
```
## Usage example

```ruby
# config/routes.rb
free = FriendlyRoutes::Params::BooleanParams.new(:free, true: :free, false: :paid)
category = FriendlyRoutes::Params::CollectionParams.new(:category_id, Category, :title)

dummies_route = FriendlyRoutes::Route.new('/', controller: :dummies, action: :index)
dummies_route.params = [free, category]

friendly_url_for dummies_route, :get # '/:free/:category'

second_dummies_route = FriendlyRoutes::Route.new(controller: :dummies, action: :index)
dummies_route.params = [free, 'categories', category]

friendly_url_for dummies_route, :get, '/' # '/:free/categories/:category'
friendly_url_for dummies_route, :get, '/hello/' # '/hello/:free/categories/:category'<commit_msg>v 0.3.2<commit_after># Friendly Routes
Friendly Routes creates DSL for creating rails routes with human friendly URLs

[![Code Climate](https://codeclimate.com/github/RoM4iK/friendly_routes/badges/gpa.svg)](https://codeclimate.com/github/RoM4iK/friendly_routes)
[![Build Status](https://travis-ci.org/RoM4iK/friendly_routes.svg?branch=master)](https://travis-ci.org/RoM4iK/friendly_routes)
## Usage
How to use my plugin.

## Installation
Add this line to your application's Gemfile:

```ruby
gem 'friendly_routes'
```

And then execute:
```bash
$ bundle
```

Or install it yourself as:
```bash
$ gem install friendly_routes
```
## Usage example

```ruby
# config/routes.rb
free = FriendlyRoutes::Params::BooleanParams.new(:free, true: :free, false: :paid)
category = FriendlyRoutes::Params::CollectionParams.new(:category_id, Category, :title)

dummies_route = FriendlyRoutes::Route.new([free, category], controller: :dummies, action: :index)

friendly_url_for dummies_route, :get # '/:free/:category'

second_dummies_route = FriendlyRoutes::Route.new([free, 'categories', category], controller: :dummies, action: :index)

friendly_url_for dummies_route, :get, '/' # '/:free/categories/:category'
friendly_url_for dummies_route, :get, '/hello/' # '/hello/:free/categories/:category'
{'fraction_non_alphanumeric': 0.15120274914089346, 'fraction_numerical': 0.004200076365024819, 'mean_word_length': 6.6608187134502925, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, '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': '7671106', 'n_tokens_mistral': 908, 'n_tokens_neox': 892, 'n_words': 187}