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
require 'adwords_api' | |
class TargetingController < ApplicationController | |
respond_to :json | |
def show(keyword_text) | |
adwords = AdwordsApi::Api.new |
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 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" |
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
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"=>"[email protected]"}, "commit"=> | |
"} | |
Parameters: {"utf8"=>"√", "authenticity_token"=>"8AvNiGAh7TBZB3MNan4c | |
Qr8RiYtUOlOiKw=", "coming"=>{"email"=>"[email protected]"}, "commit"=> | |
"} |
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 Coming < ActiveRecord::Base | |
attr_accessible :email | |
end |
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
post 'landing/soon' => 'landing#save_email' | |
get 'landing/soon' => 'landing#soon' | |
get 'main/home' |
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
<%= 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 %> |
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 LandingController < ApplicationController | |
layout 'landingPage' | |
def soon | |
@coming = Coming.new | |
end |
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
@import "bootstrap"; | |
/*mixins, variables, etc*/ | |
$grayMediumLight: #eaeaea; | |
@mixin box_sizing { | |
-moz-box-sizing: border-box; | |
-webkit-box-sizing: border-box; | |
box-sizing: border-box; |
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
# == Schema Informationdescribe "when name is not present" do | |
# before { @user.name = " " } | |
# it { should_not be_valid } | |
# end | |
# | |
# Table name: users | |
# | |
# id :integer not null, primary key | |
# name :string(255) | |
# email :string(255) |