<commit_before>Styx
========

Bridge between Server (Rails) side and Client (JS) side which is divided into several modules:

* **Helpers**: set of helpers to support all other modules.
* **Initializer**: organizes JS into bootstrap classes and allows you to pass data from controller/view.
* **Forms**: remote validation engine.


Installation
------------

In your Gemfile, add this line:

    gem 'styx'
    

Basic Usage
------------

```ruby
# app/controllers/foos_controller.rb
class FoosController < ApplicationController
  include Styx::Initializer
  include Styx::Forms
end
```

Include modules to ApplicationController if you want to use it everywhere.


Initializer
------------

In common each controller in Rails comes with *app/assets/javascripts/controller_name.js.coffee*. 
**Styx.Initializer** allows you to separately define bootstrap logic for each Rails action and pass
some data from server right in.

To enable initializers bootstrap, add *styx_initialize* line to your layout:

```erb
  <head>
    <title>Rails Application</title>
    <%= stylesheet_link_tag    "application" %><commit_msg>Doc improved<commit_after>Styx
========

Bridge between Server (Rails) side and Client (JS) side which is divided into several modules:

* **Helpers**: set of helpers to support all other modules.
* **Initializer**: organizes JS into bootstrap classes and allows you to pass data from controller/view.
* **Forms**: remote validation engine.


Installation
------------

In your Gemfile, add this line:

    gem 'styx'
    

Basic Usage
------------

```ruby
# app/controllers/foos_controller.rb
class FoosController < ApplicationController
  include Styx::Initializer
  include Styx::Forms
end
```

Include modules to ApplicationController if you want to use it everywhere.


Initializer
------------

In common each controller in Rails comes with *app/assets/javascripts/controller_name.js.coffee*. 
**Styx.Initializer** allows you to define bootstrap logic for each Rails action separately and 
pass some data from server right into it.

To enable initializers bootstrap, add *styx_initialize* line to your layout:

```erb
  <head>
    <title>Rails Application</title>
    <%= stylesheet_link_tag    "application" %>
{'fraction_non_alphanumeric': 0.11564320932317347, 'fraction_numerical': 0.0, 'mean_word_length': 3.8947368421052633, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, 'https://': 0, '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': '691067', 'n_tokens_mistral': 631, 'n_tokens_neox': 591, 'n_words': 244}