Skip to content

Instantly share code, notes, and snippets.

View oseifrimpong's full-sized avatar
🎯
Focus

Obed Osei Frimpong oseifrimpong

🎯
Focus
View GitHub Profile
class HomeController < ApplicationController
def index()
@selected_account = selected_account
end
end
AdwordsOnRails::Application.routes.draw do
# The priority is based upon order of creation:
# first created -> highest priority.
get 'login/prompt'
get 'login/callback'
get 'login/logout'
require 'adwords_api'
class LoginController < ApplicationController
skip_before_filter :authenticate
GOOGLE_LOGOUT_URL = 'https://www.google.com/accounts/Logout'
def prompt()
api = get_adwords_api()
require 'adwords_api'
class ApplicationController < ActionController::Base
before_filter :authenticate
protect_from_forgery
private
# Returns the API version in use.
require 'adwords_api'
class TargetingController < ApplicationController
respond_to :json
def show(keyword_text)
adwords = AdwordsApi::Api.new
class StudentsController < ApplicationController
def new
@student = Student.new
end
def create
@student = Student.new(student_params)
if @student.save
session[:user_id] = @user.id
redirect_to student_path, notice: "Student saved successfully"
Started POST "/landing/soon" for 127.0.0.1 at 2014-08-20 05:23:11 +0800
Started POST "/landing/soon" for 127.0.0.1 at 2014-08-20 05:23:11 +0800
Processing by LandingController#save_email as HTML
Processing by LandingController#save_email as HTML
Parameters: {"utf8"=>"√", "authenticity_token"=>"8AvNiGAh7TBZB3MNan4c
Qr8RiYtUOlOiKw=", "coming"=>{"email"=>"obedosei@gmail.com"}, "commit"=>
"}
Parameters: {"utf8"=>"√", "authenticity_token"=>"8AvNiGAh7TBZB3MNan4c
Qr8RiYtUOlOiKw=", "coming"=>{"email"=>"obedosei@gmail.com"}, "commit"=>
"}
class Coming < ActiveRecord::Base
attr_accessible :email
end
post 'landing/soon' => 'landing#save_email'
get 'landing/soon' => 'landing#soon'
get 'main/home'
<%= form_for(@coming, url: landing_soon_path) do |f| %>
<%= f.text_field :email, class: "form-control", placeholder: "Enter Email" %>
<br>
<%= f.submit "Alert Me", class: "btn btn-primary btn-lg btn-block" %>
<% end %>