This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ApplicationController < ActionController::Base | |
#protect_from_forgery | |
before_filter :authenticate_user! | |
before_filter :block_whole_all_requests_in_case_welcome_flow_not_completed | |
# helper_method :user_is_report_manager?, :user_is_group_member?, :user_is_manager_or_owner? | |
# =================== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'rails', '3.2.11' | |
gem 'mysql2' | |
gem 'rake', '0.9.2.2' | |
group :assets do | |
gem 'sass-rails', '~> 3.2.3' | |
gem 'coffee-rails', '~> 3.2.1' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ActiveAdmin.register_page "Dashboard" do | |
sidebar :help do | |
ul do | |
li "Stuck? Contact your manager" | |
li "or drop a mail at [email protected]" | |
end | |
end | |
menu :priority => 1, :label => proc{ I18n.t("active_admin.dashboard") } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :stages, %w(production staging) #various environments | |
load "deploy/assets" #precompile all the css, js and images... before deployment.. | |
require "bundler/capistrano" # install all the new missing plugins... | |
require 'capistrano/ext/multistage' # deploy on all the servers.. | |
require "rvm/capistrano" # if you are using rvm on your server.. | |
require './config/boot' | |
require 'delayed/recipes' # load this for delayed job.. | |
require "whenever/capistrano" | |
require './config/boot' | |
require 'airbrake/capistrano' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MySQL. Versions 4.1 and 5.0 are recommended. | |
# | |
# Install the MySQL driver: | |
# gem install mysql2 | |
# | |
# And be sure to use new-style password hashing: | |
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html | |
development: | |
adapter: mysql2 | |
encoding: utf8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ActAsCountable | |
def self.included(base) | |
base.extend(ClassMethods) | |
end | |
module ClassMethods | |
def total_records_counts_array_in_past_n_days(range = 30.days) | |
total_records = [] | |
counts = self.group('Date(created_at)').count | |
(30.days.ago.to_date..Date.today).each do |day| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= javascript_include_tag 'highcharts' %> | |
<%= javascript_include_tag 'exporting' %> | |
<script type="text/javascript"> | |
$(function () { | |
var chart; | |
$(document).ready(function() { | |
chart = new Highcharts.Chart({ | |
chart: { | |
renderTo: 'growth_rate' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
$(function () { | |
var chart; | |
$(document).ready(function() { | |
chart = new Highcharts.Chart({ | |
chart: { | |
renderTo: 'gifts_growth' | |
}, | |
title: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
devise :database_authenticatable, :registerable,:async, | |
:recoverable, :rememberable, :trackable, :validatable, :token_authenticatable, :confirmable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module AccountSetup | |
def self.included(base) | |
base.extend(ClassMethods) | |
end | |
module ClassMethods | |
end | |
end |