<commit_before># Olala

Dynamic content edition for rails

## Installation

Add this line to your application's Gemfile:

    gem 'olala'

And then execute:

    $ bundle
    $ rails g olala:install

    Add `require olala` at the end of `app/assets/javascripts/application.js`

   Add this in `application.html.erb` before `</head>` tag

    ````
      <% if session[:admin] %>
          <link rel="stylesheet" href="/aloha/css/aloha.css" type="text/css">
          <script src="/aloha/lib/require.js"></script>
          <script src="/aloha/lib/vendor/jquery-1.7.2.js"></script>
          <script src="/aloha/lib/aloha.js" data-aloha-plugins="common/ui,common/format,common/table,common/list,common/highlighteditables,common/link,common/image,common/block,common/undo"></script>
      <% end %>
    ````

    Change your body tag to: `<body class='<%= 'admin' if session[:admin] %>'>`

    Replace each block that you want to make dynamic:

    `<p>Static text</p>`
    =>
    `<p>Olala::editable('my_title', 'Static text')</p>`

    Load helpers:
    `helper Olala::ApplicationHelper` in application_helper.rb

Make sure that you have:

 - jquery in your javascript dependencies'
 - a database with activeRecord (pg, mysql, sqlite), jquery

## Usage:

todo

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
<commit_msg>readme + fixes<commit_after># Olala

Dynamic content edition for rails

## Installation

Add this line to your application's Gemfile:

    gem 'olala'

And then execute:

    $ bundle
    $ rails g olala:install

    Add `require olala` at the end of `app/assets/javascripts/application.js`

   Add this in `application.html.erb` before `</head>` tag

```
      <% if session[:admin] %>
          <link rel="stylesheet" href="/aloha/css/aloha.css" type="text/css">
          <script src="/aloha/lib/require.js"></script>
          <script src="/aloha/lib/vendor/jquery-1.7.2.js"></script>
          <script src="/aloha/lib/aloha.js" data-aloha-plugins="common/ui,common/format,common/table,common/list,common/highlighteditables,common/link,common/image,common/block,common/undo"></script>
      <% end %>
```

   Change your body tag to: `<body class='<%= 'admin' if session[:admin] %>'>`

    Replace each block that you want to make dynamic:

    `<p>Static text</p>`
    =>
    `<p>Olala::editable('my_title', 'Static text')</p>`

    Load helpers:
    `helper Olala::ApplicationHelper` in application_helper.rb

Make sure that you have:

 - jquery in your javascript dependencies'
 - a database with activeRecord (pg, mysql, sqlite), jquery

## Usage:

todo

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

{'fraction_non_alphanumeric': 0.14375830013280214, 'fraction_numerical': 0.005312084993359893, 'mean_word_length': 3.4571005917159763, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 37, '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': '6008122', 'n_tokens_mistral': 1021, 'n_tokens_neox': 932, 'n_words': 281}