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
## From User Model ## | |
def send_activation_email | |
reset_perishable_token! | |
UserMailer.activation(self).deliver | |
end | |
##Controller for Activation Email## | |
class ActivationsController < ApplicationController | |
def create | |
if @user = User.find_using_perishable_token(params[:token]) |
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
class Organization < ActiveRecord::Base | |
attr_accessible :name, :employee_number, :country, :postal_code, :sic_code, :primary_url, :social_entities_attributes, :social_channels_attributes | |
has_one :user | |
has_one :social_score, :through => :social_entities | |
has_many :social_entities | |
has_many :social_channels, :through => :social_entities | |
accepts_nested_attributes_for :social_entities, :social_channels | |
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
google.load("visualization", "1", {packages:["corechart"]}); | |
google.setOnLoadCallback(drawChart); | |
function drawChart() { | |
var selectedValue = $("select option:selected").val() | |
var jsonData = $.ajax({ | |
type: 'get', | |
url: '/social_scores/'+selectedValue, | |
dataType:"json", | |
success: function(response, status, jqXHR) { |
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
@charset "UTF-8"; | |
/* CSS Document - general css here */ | |
html p h1 h2 h3 h4 h5 { | |
font-family: 'Source Sans Pro', sans-serif; | |
color:#424242; | |
-ms-text-size-adjust: 100%; | |
-webkit-text-size-adjust: 100%; |