<commit_before>[travis]: https://travis-ci.org/blacktangent/attributes_for
[codeclimate]: https://codeclimate.com/github/blacktangent/attributes_for
[coveralls]: https://coveralls.io/r/blacktangent/attributes_for
[rubygems]: https://rubygems.org/gems/attributes_for
[fontawesome]: https://fortawesome.github.io/Font-Awesome
[fontawesomerails]: https://github.com/bokmann/font-awesome-rails


# AttributesFor

[![Build Status](https://travis-ci.org/blacktangent/attributes_for.svg?branch=master)][travis]
[![Code Climate](https://codeclimate.com/github/blacktangent/attributes_for/badges/gpa.svg)][codeclimate]
[![Test Coverage](http://img.shields.io/coveralls/blacktangent/attributes_for/master.svg)][coveralls]
[![Gem Version](http://img.shields.io/gem/v/attributes_for.svg)][rubygems]

ActiveView Helper to present formatted ActiveModel attributes with
icons.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'attributes_for'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install attributes_for

Run generator to add I18n locales:

    $ rails generate attributes_for:install

Preferred icon and CSS framework is [Font Awesome][fontawesome] Bring
[Font Awesome][fontawesome] into your project by using
[font-awesome-rails][fontawesomerails] or your preferred method.

## Screenshot
![Screenshot](https://cloud.githubusercontent.com/assets/1222916/9355402/295b6324-46a3-11e5-9f8c-ff864b837cdd.png)

## Usage

Present attributes using the API in the example below. It can also generate a
standard label value pair given an attribute name using the `attribute` method. Arbitrary
strings can also be presented using the `string` method.

```erb
<ul class="list-unstyled">
  <%= attributes_for @company do |b| %>
    <li><%= b.attribute :name, class: 'fa fa-building-o' %></li>
    <li><%= b.phone :phone %></li><commit_msg>README.md: Added sample application link<commit_after>[travis]: https://travis-ci.org/blacktangent/attributes_for
[codeclimate]: https://codeclimate.com/github/blacktangent/attributes_for
[coveralls]: https://coveralls.io/r/blacktangent/attributes_for
[rubygems]: https://rubygems.org/gems/attributes_for
[fontawesome]: https://fortawesome.github.io/Font-Awesome
[fontawesomerails]: https://github.com/bokmann/font-awesome-rails


# AttributesFor

[![Build Status](https://travis-ci.org/blacktangent/attributes_for.svg?branch=master)][travis]
[![Code Climate](https://codeclimate.com/github/blacktangent/attributes_for/badges/gpa.svg)][codeclimate]
[![Test Coverage](http://img.shields.io/coveralls/blacktangent/attributes_for/master.svg)][coveralls]
[![Gem Version](http://img.shields.io/gem/v/attributes_for.svg)][rubygems]

ActiveView Helper to present formatted ActiveModel attributes with
icons.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'attributes_for'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install attributes_for

Run generator to add I18n locales:

    $ rails generate attributes_for:install

Preferred icon and CSS framework is [Font Awesome][fontawesome] Bring
[Font Awesome][fontawesome] into your project by using
[font-awesome-rails][fontawesomerails] or your preferred method.

## Screenshot
![Screenshot](https://cloud.githubusercontent.com/assets/1222916/9355402/295b6324-46a3-11e5-9f8c-ff864b837cdd.png)

## Sample Application

Sample applciaiton using `attributes_for` can be found
[here](https://github.com/blacktangent/attributes_for).

## Usage

Present attributes using the API in the example below. It can also generate a
standard label value pair given an attribute name using the `attribute` method. Arbitrary
strings can also be presented using the `string` method.

```erb
<ul class="list-unstyled">
  <%= attributes_for @company do |b| %>
    <li><%= b.attribute :name, class: 'fa fa-building-o' %></li>
    <li><%= b.phone :phone %></li>
{'fraction_non_alphanumeric': 0.1324655436447167, 'fraction_numerical': 0.018887187340479835, 'mean_word_length': 5.586554621848739, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 19, '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': '158362', 'n_tokens_mistral': 1365, 'n_tokens_neox': 1278, 'n_words': 293}