<commit_before>RailsAdmin
==========
RailsAdmin is a Rails engine that provides an easy-to-use interface for managing your data.

RailsAdmin started as a port of [MerbAdmin](http://github.com/sferik/merb-admin) to Rails 3
and was implemented as a [Ruby Summer of Code project](http://www.rubysoc.org/projects)
by [<NAME>](http://github.com/hurrycane) with mentors [<NAME>](http://github.com/sferik),
[<NAME>](http://github.com/wycats),
[<NAME>](http://github.com/plukevdh), and [<NAME>](http://github.com/reinh).

It currently offers the following features:

* Display database tables
* Create new data
* Easily update data
* Safely delete data
* Automatic form validation
* Search
* Authentication (via [Devise](http://github.com/plataformatec/devise))
* User action history

Help
----
If you have a question, you can ask the [official RailsAdmin mailing list](http://groups.google.com/group/rails_admin)
or ping sferik on IRC in [#railsadmin on irc.freenode.net](http://webchat.freenode.net/?channels=railsadmin).

Screenshots
-----------
![List view](https://github.com/sferik/rails_admin/raw/master/screenshots/list.png "List view")
![Edit view](https://github.com/sferik/rails_admin/raw/master/screenshots/edit.png "Edit view")

Installation
------------
In your `Gemfile`, add the following dependency:
    gem 'devise' # Devise must be required before RailsAdmin
    gem 'rails_admin', :git => 'git://github.com/sferik/rails_admin.git'
Run:
    $ bundle install
And then run:
    $ rails generate rails_admin:install_admin
This task will install RailsAdmin and [Devise](http://github.com/plataformatec/devise) if you
don't already have it installed. [Devise](http://github.com/plataformatec/devise) is strongly
recommended to protect your data from anonymous users.

If you plan to use Devise, but want to use a custom model for authentication
(default is User) you can provide that as an argument for the installer. For example
to override the default with a Member model run:
    $ rails generate rails_admin:install_admin member

If you want to use the CKEditor, you need to [download it](http://ckeditor.com/download) from source
and unpack the 'ckeditor' folder into your default 'public/javascripts' folder. If you're using any
non-Windows system, you can try to use the automatic downloader:
    $ rake admin:ckeditor_download

Usage
-----
Start the server:
    $ rails server
You should now be able to administer your site at <http://localhost:3000/admin>

Configuration
-------------
RailsAdmin provides its out of the box administrative interface by inspecting your application's
models and following some Rails conventions. For a more tailored experience, it also provides a
configuration DSL which allows you to customize many aspects of the interface.

The configuration code should be placed in an initializer file, for example:
    config/initializers/rails_admin.rb

### General

You can customize authentication by providing a custom block for `RailsAdmin.authenticate_with`.
To disable authentication, pass an empty block:

    RailsAdmin.authenticate_with {}

You can exclude models from RailsAdmin by appending those models to `excluded_models`:

    RailsAdmin.config do |config|
      config.excluded_models << ClassName
    end

### Navigation ###

* hiding a model
* setting the model's label
* configuring the number of visible tabs

You can hide a model from the top navigation by marking its `visible` option
as false within the model's navigation configuration section:

By using an accessor:

    RailsAdmin.config do |config|
      config.model Team do
        navigation do
          self.visible = false
        end
      end
    end

Or by passing the value as an argument:

    RailsAdmin.config do |config|
      config.model Team do
        navigation do
          visible false
        end
      end
    end

Or by passing a block that will be lazy evaluated each time the option is read:

    RailsAdmin.config do |config|
      config.model Team do
        navigation do
          visible { false }
        end
      end
    end

These three examples also work as a generic example of how most of the configuration options
function within RailsAdmin. You can access them with `option_name = value`, you<commit_msg>Remove documentation related to using an accessor in the config dsl since it's not supported<commit_after>RailsAdmin
==========
RailsAdmin is a Rails engine that provides an easy-to-use interface for managing your data.

RailsAdmin started as a port of [MerbAdmin](http://github.com/sferik/merb-admin) to Rails 3
and was implemented as a [Ruby Summer of Code project](http://www.rubysoc.org/projects)
by [<NAME>](http://github.com/hurrycane) with mentors [<NAME>](http://github.com/sferik),
[<NAME>](http://github.com/wycats),
[<NAME>](http://github.com/plukevdh), and [<NAME>](http://github.com/reinh).

It currently offers the following features:

* Display database tables
* Create new data
* Easily update data
* Safely delete data
* Automatic form validation
* Search
* Authentication (via [Devise](http://github.com/plataformatec/devise))
* User action history

Help
----
If you have a question, you can ask the [official RailsAdmin mailing list](http://groups.google.com/group/rails_admin)
or ping sferik on IRC in [#railsadmin on irc.freenode.net](http://webchat.freenode.net/?channels=railsadmin).

Screenshots
-----------
![List view](https://github.com/sferik/rails_admin/raw/master/screenshots/list.png "List view")
![Edit view](https://github.com/sferik/rails_admin/raw/master/screenshots/edit.png "Edit view")

Installation
------------
In your `Gemfile`, add the following dependency:
    gem 'devise' # Devise must be required before RailsAdmin
    gem 'rails_admin', :git => 'git://github.com/sferik/rails_admin.git'
Run:
    $ bundle install
And then run:
    $ rails generate rails_admin:install_admin
This task will install RailsAdmin and [Devise](http://github.com/plataformatec/devise) if you
don't already have it installed. [Devise](http://github.com/plataformatec/devise) is strongly
recommended to protect your data from anonymous users.

If you plan to use Devise, but want to use a custom model for authentication
(default is User) you can provide that as an argument for the installer. For example
to override the default with a Member model run:
    $ rails generate rails_admin:install_admin member

If you want to use the CKEditor, you need to [download it](http://ckeditor.com/download) from source
and unpack the 'ckeditor' folder into your default 'public/javascripts' folder. If you're using any
non-Windows system, you can try to use the automatic downloader:
    $ rake admin:ckeditor_download

Usage
-----
Start the server:
    $ rails server
You should now be able to administer your site at <http://localhost:3000/admin>

Configuration
-------------
RailsAdmin provides its out of the box administrative interface by inspecting your application's
models and following some Rails conventions. For a more tailored experience, it also provides a
configuration DSL which allows you to customize many aspects of the interface.

The configuration code should be placed in an initializer file, for example:
    config/initializers/rails_admin.rb

### General

You can customize authentication by providing a custom block for `RailsAdmin.authenticate_with`.
To disable authentication, pass an empty block:

    RailsAdmin.authenticate_with {}

You can exclude models from RailsAdmin by appending those models to `excluded_models`:

    RailsAdmin.config do |config|
      config.excluded_models << ClassName
    end

### Navigation ###

* hiding a model
* setting the model's label
* configuring the number of visible tabs

You can hide a model from the top navigation by marking its `visible` option
as false within the model's navigation configuration section:

By passing the value as an argument:

    RailsAdmin.config do |config|
      config.model Team do
        navigation do
          visible false
        end
      end
    end

Or by passing a block that will be lazy evaluated each time the option is read:

    RailsAdmin.config do |config|
      config.model Team do
        navigation do
          visible { false }
        end
      end
    end

These three examples also work as a generic example of how most of the configuration options
function within RailsAdmin. You can access them with `option_name = value`, you
{'fraction_non_alphanumeric': 0.08993830090175606, 'fraction_numerical': 0.0011865211200759373, 'mean_word_length': 3.8750722961249275, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 17, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '553956', 'n_tokens_mistral': 2403, 'n_tokens_neox': 2266, 'n_words': 955}