This file contains 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
# admin/users.rb | |
index do | |
column("") { |user| link_to "Switch", switch_to_admin_user_path(user), method: :post, target: "_blank"} | |
end | |
member_action :switch_to, method: :post do | |
user = User.find(params[:id]) | |
sign_out :user if user_signed_in? |
This file contains 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
#overlay{ | |
background: #000 repeat top left; | |
position:fixed; | |
top:0px; | |
bottom:0px; | |
left:0px; | |
right:0px; | |
z-index:100; | |
} |
This file contains 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
@import "dataTables/jquery.dataTables"; | |
/* A modifier pour avoir les bons espacements */ | |
body.active_admin .data_table { | |
padding-bottom: 10px; | |
} | |
body.active_admin .dataTables_paginate { | |
margin-top: -10px; |
This file contains 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
<?php | |
class MetricsTracker { | |
public $token; | |
public $host = 'http://api.mixpanel.com/'; | |
public function __construct($token_string) { | |
$this->token = $token_string; | |
} | |
This file contains 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
# /lib/facturation_proxy.rb | |
# Exemple : /factures?api_id=67863 | |
require 'net/http' | |
class FacturationProxy | |
def self.call(env) | |
request = Rack::Request.new(env) |
This file contains 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
gem "paymill" |
This file contains 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
<%= | |
f.association :category_id, collection: Category.roots, | |
as: :grouped_select, | |
group_method: :children, group_label_method: :name, | |
label_method: :name | |
%> |
This file contains 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
group :production do | |
gem 'unicorn' | |
# Enable gzip compression on heroku, but don't compress images. | |
gem 'heroku-deflater' | |
# Heroku injects it if it's not in there already | |
gem 'rails_12factor' | |
end |
This file contains 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
/* | |
*= require bootstrap | |
*/ | |
@font-face { | |
font-family: 'Glyphicons Halflings'; | |
src: url('../assets/bootstrap/fonts/glyphicons-halflings-regular.eot'); | |
src: url('../assets/bootstrap/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), | |
url('../assets/bootstrap/fonts/glyphicons-halflings-regular.woff') format('woff'), | |
url('../assets/bootstrap/fonts/glyphicons-halflings-regular.ttf') format('truetype'), |
This file contains 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
version: 2 | |
jobs: | |
checkout_code: | |
docker: | |
- image: circleci/ruby:2.5.1-node-browsers | |
- image: circleci/postgres:10.3-alpine | |
working_directory: ~/circleci-app | |
steps: | |
- checkout | |
- save_cache: |
OlderNewer