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
up 20150117091501 Devise create admin users | |
up 20150117091505 Create active admin comments | |
up 20150120010407 ********** NO FILE ********** | |
up 20150127002712 ********** NO FILE ********** | |
up 20150127225430 Create products | |
up 20150127230158 Create categories |
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
["image/jpg", "image/jpeg", "image/png", "image/gif"] | |
/^image\/(jpeg|png|gif|tiff|jpg)$/ |
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 |
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
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
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
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
<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
<!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> |
NewerOlder