ActivePortal
What's this?
ActivePortal is a gem for Ruby on Rails 4 applications. It contains a group of gem that need for a modern portal. Every gem is optimised for a content heavy website with more thousand users.
Features
- User authentication and registration with confirmation (devise)
- I18n and language detection (devise-i18n, devise-i18n-bootstrap, http_accept_language)
Documentation
Requirements
Before install this gem make sure you did these steps:
1. Add gem 'devise' to your Gemfile
2. execute following command bundle exec rails generate devise:install
Install
1. Put your Gemfile the following line:
gem 'activeportal', github: 'nyjt/activeportal'2. Execute bundle:
bundle install3. Mount the active_portal Rails engine. Put the following line into config/routes.rb:
mount ActivePortal::Engine => '/custom_name'You can change custom_name prefix as you would like. Another option to mount the engine to '/' like here:
mount ActivePortal::Engine => '/'
# and here come the other routes4. Create your customised user model to app/models/active_portal/user.rb with the following content:
module ActivePortal
class User < ActiveRecord::Base
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :registerable, :confirmable,
:recoverable, :rememberable, :trackable, :validatable
end
endOf course you can add or remove modules to change capaiblities of Devise.
5. Change the first line on app/controllers/application_controller.rb:
class ApplicationController < ActivePortal::ApplicationControllerYour ApplicationController should inherit from ActivePortal::ApplicationController.
6. Make sure you have added root path to your routes:
root 'pages#home'7. Database migrations:
bundle exec rake railties:install:migrations
bundle exec rake db:migrateConfiguration
- Make sure you added this line to
config/environments/production.rb:
config.action_mailer.default_url_options = { host: 'myhost.example.com' }License
This project rocks and uses MIT-LICENSE.