GithubHelp home page GithubHelp logo

rdeshpande / activeadmin-mongoid Goto Github PK

View Code? Open in Web Editor NEW

This project forked from activeadmin/activeadmin-mongoid

2.0 2.0 1.0 100 KB

ActiveAdmin hacks to support Mongoid

License: MIT License

Ruby 100.00%

activeadmin-mongoid's Introduction

ActiveAdmin::Mongoid

ActiveAdmin hacks to support Mongoid. Some ActiveAdmin features are disabled:

  • comments
  • sidebar filters

For more on Mongoid support in ActiveAdmin see this issue.

Installation

Some Gems

Add the following gems to your application's Gemfile:

gem 'activeadmin-mongoid'
gem 'devise'

Devise is the gem used to managed admin authentication. The gem is required to force itself ORM configuration. Else the gem will try to use by default ActiveRecord ORM.

You can safely remove the following lines, since are already activeadmin-mongoid dependencies:

gem 'activeadmin'
gem 'meta_search', '>= 1.1.0.pre'
gem 'sass-rails',  ['~> 3.1', '>= 3.1.4']

Remove Application Dependencies

In your config/application.rb, replace :

require 'rails/all'

with :

require "action_controller/railtie"
require "action_mailer/railtie"
require "active_resource/railtie"
require "sprockets/railtie"
require "rails/test_unit/railtie"

rails/all includes elements requiring ActiveRecord::Connection ...

Bundle & Crank

Execute:

$ bundle
$ rails g devise:install

Check that the generated initializers/devise.rb file requires mongoid orm. You may find a line like this :

require 'devise/orm/mongoid'

And that's pretty much it !

Contributing

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

Copyright

Copyright © 2012 Elia Schito. See LICENSE for details.

activeadmin-mongoid's People

Contributors

elia avatar proxygear avatar rdeshpande avatar vkhang55 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

vkhang55

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.