Skip to content

Instantly share code, notes, and snippets.

View jaemar's full-sized avatar

jaemar joseph ramos jaemar

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jaemar on github.
  • I am jayramos (https://keybase.io/jayramos) on keybase.
  • I have a public key ASDZ6q4UB21O1h2r5WrEuQdWKIptVf1fX8VVimQvf6yxcwo

To claim this, I am signing this object:

# config/routes.rb
devise_for :users, controllers: { omniauth_callbacks: 'omniauth_callbacks' }
# config/initializer/devise.rb
Devise.setup do |config|
if Rails.env.production?
fb_key = "fb_key"
fb_secret = "fb_secret"
else
fb_key = "fb_key"
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function(e) {
$('#previewHolder').attr('src', e.target.result);
}
reader.readAsDataURL(input.files[0]);
}
}
class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
before_filter :configure_permitted_parameters, if: :devise_controller?
protected
def configure_permitted_paramters
devise_parameter_sanitizer.for(:sign_in) { |u| u.permit(:login, :remember_me, :password) }
devise_parameter_sanitizer.for(:sign_up) { |u| u.permit(:username, :email, :password, :password_confirmation) }
end
end

Proudcloud Playbook - Rails

Rails Fundamentals

Strings, Hashes, Arrays
Iterators
Scaffold

MVC (Model, View, Controller)

@jaemar
jaemar / gist:5507979
Last active December 16, 2015 22:38
Sample Email Template
<!--
These are the global variables you can use:
*|team|* - Account Name
*|link|* - Survey url
*|title|* - Survey title
-->
<head>
<style type="text/css">