Project

admin_bits

0.01
No commit activity in last 3 years
No release in over 3 years
AdminBits simplifies creation of sortable / searchable lists found in dashboards / admin panels
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

alt tag

Build Status

AdminBits simplifies creation of sortable & searchable lists found in various dashboards (like admin sections, search forms etc).

Information

Getting Help

  • Please report bugs on the issue tracker but read the "getting help" section in the wiki first.

Installation

In Rails, for latest stable release add it to your Gemfile:

gem 'admin_bits'

If you are brave enough to live on the edge, or just want to checkout latest version use:

gem 'admin_bits', git: 'https://github.com/detomastah/admin_bits.git'

Getting Started

The easiest way to get started is to user admin_bits generator.

Let's assume that you have model Item. The following command will create a new Admin::ItemsController with initial resource:

rails generate admin_bits items

The resource, layout and assets can be freely modified. If there were no errors, one should be able to see new route admin/items.

Some new files should have appeared, like:

app/models/admin/item_resource.rb
app/controllers/admin/base_controller.rb
app/controllers/admin/items_controller.rb
app/views/layouts/admin.html.erb

If you want to learn more about the generator check its documentation.

Check out your item_resource class for some hints on how you can customize your Resource. This class contain settings associated with the items resource. You can also check documentation for more information.

You will find resource private method in resource items_controller.

def resource
  @resource ||= Admin::ItemResource.new(params)
end

You can use this for example in your index action:

def index
  @items = resource.fetch_for_index
end

Credits

admin_bits is maintained and funded by bitmincer & detomastah. Thank you to all the contributors.

License

admin_bits is copyright © 2013-2015 bitmincer. It is free software, and may be redistributed under the terms specified in the LICENSE file.