GithubHelp home page GithubHelp logo

analyticsdashboard's Introduction

Setup

I

Include: config/application.yml with

GMAIL_USERNAME: ENV["GMAIL_USERNAME"]
GMAIL_PASSWORD: ENV["GMAIL_PASSWORD"]
ADMIN_NAME: admin
ADMIN_EMAIL: user@example.com
ADMIN_PASSWORD: changeme
ROLES: [admin, user, VIP]

config/database.yml with

development:
  adapter:  postgresql
  host:     localhost
  encoding: unicode
  database: AnalyticsDashboard_development
  pool:     5
  username: postgres_username
  password: 

II

Run on commandline or terminal or iTerm

rake db:drop  db:create db:migrate db:seed && rails s

III

Runing Test

rake

Analyticsdashboard

  • git: true

  • dev_webserver: webrick

  • prod_webserver: thin

  • database: postgresql

  • templates: haml

  • unit_test: rspec

  • integration: rspec-capybara

  • continuous_testing: guard

  • fixtures: machinist

  • frontend: bootstrap2

  • email: gmail

  • authentication: devise

  • devise_modules: default

  • authorization: cancan

  • form_builder: simple_form

  • starter_app: admin_app

  • rvmrc: false

  • quiet_assets: true

  • local_env_file: figaro

  • better_errors: true

  • ban_spiders: true

  • github: true

    Be sure to have a copy of the Bootstrap stylesheet available on your application, you can get it on http://twitter.github.com/bootstrap.

    Inside your views, use the 'simple_form_for' with one of the Bootstrap form classes, '.form-horizontal', '.form-inline', '.form-search' or '.form-vertical', as the following:

    = simple_form_for(@user, html: {class: 'form-horizontal' }) do |form|

Some setup you must do manually if you haven't yet:

  1. Ensure you have defined default url options in your environments files. Here is an example of default_url_options appropriate for a development environment in config/environments/development.rb:

    config.action_mailer.default_url_options = { :host => 'localhost:3000' }

    In production, :host should be set to the actual host of your application.

  2. Ensure you have defined root_url to something in your config/routes.rb. For example:

    root :to => "home#index"

  3. Ensure you have flash messages in app/views/layouts/application.html.erb. For example:

    <%= notice %>

    <%= alert %>

  4. If you are deploying on Heroku with Rails 3.2 only, you may want to set:

    config.assets.initialize_on_precompile = false

    On config/application.rb forcing your application to not access the DB or load models when precompiling your assets.

  5. You can copy Devise views (for customization) to your app by running:

    rails g devise:views

An initializer file has been created here: config/initializers/rolify.rb, you can change rolify settings to match your needs. Defaults values are commented out.

A Role class has been created in app/models (with the name you gave as argument otherwise the default is role.rb), you can add your own business logic inside.

Inside your User class (or the name you gave as argument otherwise the default is user.rb), rolify method has been inserted to provide rolify methods.

ROLES role: admin role: user role: VIP DEFAULT USERS user: First User

analyticsdashboard's People

Watchers

 avatar

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.