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
jason@lebo0m ~/rails/sample_app $ rails generate model User name:string email:string | |
/home/jason/.rvm/gems/ruby-2.0.0-p353@railstutorial_rails_4_0/gems/actionpack-4.0.4/lib/action_dispatch/routing/mapper.rb:230:in `default_controller_and_action': Missing :controller key on routes definition, please check your routes. (ArgumentError) | |
from /home/jason/.rvm/gems/ruby-2.0.0-p353@railstutorial_rails_4_0/gems/actionpack-4.0.4/lib/action_dispatch/routing/mapper.rb:116:in `normalize_options!' | |
from /home/jason/.rvm/gems/ruby-2.0.0-p353@railstutorial_rails_4_0/gems/actionpack-4.0.4/lib/action_dispatch/routing/mapper.rb:64:in `initialize' | |
from /home/jason/.rvm/gems/ruby-2.0.0-p353@railstutorial_rails_4_0/gems/actionpack-4.0.4/lib/action_dispatch/routing/mapper.rb:1451:in `new' | |
from /home/jason/.rvm/gems/ruby-2.0.0-p353@railstutorial_rails_4_0/gems/actionpack-4.0.4/lib/action_dispatch/routing/mapper.rb:1451:in `add_route' | |
from /home/jason/.rvm/gems/ruby-2.0.0-p353@railstutorial_rails_4_0/gems/actionpack-4.0.4/lib/ac |
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 'spec_helper' | |
describe "User pages" do | |
subject { page } | |
# Profile page tests | |
describe "profile page" do | |
let(:user) { FactoryGirl.create(:user) } | |
before { visit user_path(user) } |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Gastro</title> | |
<%= stylesheet_link_tag "application", media: "all", | |
"data-turbolinks-track" => true %> | |
<%= javascript_include_tag "application", "data-turbolinks-track" => true %> | |
<%= csrf_meta_tags %> | |
</head> | |
<body> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Gastro</title> | |
<%= stylesheet_link_tag "application", media: "all", | |
"data-turbolinks-track" => true %> | |
<%= javascript_include_tag "application", "data-turbolinks-track" => true %> | |
<%= csrf_meta_tags %> | |
</head> | |
<body> |
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
<p> | |
<strong>Commenter:</strong> | |
<%= comment.commenter %> | |
</p> | |
<p> | |
<strong>Comment:</strong> | |
<%= comment.body %> | |
</p> |
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
Software Engineer | |
Software Engineering - MyCase | San Diego, CA, United States | |
We have small, high caliber teams developing easy-to-use solutions for our customers, and are looking for sharp Software Engineers to continue our rapid growth pace. If you enjoy building from back-end to client–side in an environment that values shared responsibility and continuous learning, apply today. | |
Responsibilities: | |
● Develop scalable, robust, and simple web-based solutions to solve complex business problems | |
● Formulate, implement, and evaluate algorithms and database queries to support SaaS scalability and stability. |
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
case | |
when p1[1] == "R" && p2[1] == "S" || p1[1] == "P" && p2[1] == "R" || p1[1] == "S" && p2[1] == "P" || p1[1] == p2[1] | |
then p1 | |
else p2 | |
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
class Event < ActiveRecord::Base | |
validates :title, :start_date, presence: true | |
validate :startdate_before_enddate | |
def startdate_before_enddate | |
if :end_date.present? | |
unless :start_date < :end_date | |
errors.add(:start_date, "must be before end date") | |
end | |
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
context "during the weekend" do | |
before do | |
before_open = Time.parse("01/04/2014 11:00 PST") # Saturday 11:00AM | |
while_open = Time.parse("01/04/2014 14:00 PST") # Saturday 2:00PM | |
after_closed = Time.parse("01/04/2014 18:00 PST") # Saturday 6:00PM | |
end | |
it "displays 'Phones Closed' before open" do | |
Time.stub(:now).returns(before_open) | |
expect { phone_lines_open?(before_open).to eq false } | |
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
def reset_password!(new_password, new_password_confirmation) | |
self.password = new_password | |
self.password_confirmation = new_password_confirmation | |
if valid? | |
clear_reset_password_token | |
after_password_reset | |
end | |
save |
OlderNewer