Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ari

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ari

  • 0.2.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Ari

Active Record Inspector - extend rails project to easily display and navigate through ActiveRecord Models. Ari will display model data including columns, relations (has and belongs) and custom functions. It's easy to customize and extend Ari for your purposes.

Features

  • Generators - automatically generate Ari controller and corresponding views
  • Ari will display both belongs to and has relations as links for easy navigation
  • Customize each model which columns you don't wanna to display
  • Add functions that you like to display

Requirements

  • Rails 3+

Installation

Install 'ari' gem:

gem 'ari'

or

gem 'ari', :git => git://github.com/ATLANTBH/ari.git

Note: Currently ari was tested only on rails 3.0+

Setup

After installation run ari generator.

rails generate ari

Add following resource to routes.rb.

resources :ari, :only => [:index, :show]

Run rails and point your browser to ari route, e.g. http://localhost:3000/ari

Customization

By default ari will display following information from model:

  • all columns
  • all has_ relations
  • all belongs_ relations

You can exclude informations via ari_options

class User < ActiveRecord::Base
	ari_options	:exclude => [:password, :money]
end

This will exclude columns/relations names 'password' and 'money' from displaying.

In addition to excluding, sometimes is good idea to include results from some functions, e.g.

class User < ActiveRecord::Base
	ari_options	:exclude => [:password, :money], :functions => ['displayable_name']
	
	def displayable_name
		return self.name || self.email  # if name is nil return email as displayable_name
	end
end

Preview

Here is preview of ari:

Model listing Sample table 1 Sample table 2

License

Copyright 2012 AtlantBH

ari is licensed under the MIT License.

For more info see MIT_LICENSE file.

FAQs

Package last updated on 23 Apr 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc