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
source 'https://rubygems.org' | |
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
gem 'rails', '4.0.1' | |
# Use postgresql as the database for Active Record | |
gem 'pg' | |
gem 'perpetuity', git: 'git://github.com/jgaskins/perpetuity.git', ref: '82cad54d7226ad17ce25d74c751faf8f2c2c4eb2' | |
gem 'perpetuity-postgres', git: 'git://github.com/jgaskins/perpetuity-postgres.git', ref: 'c167d338edc05da582ff3856e86f7fb7693df0bb' |
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
FactoryGirl.define do | |
factory :employee do | |
# Your callback can be either for :build or :create, whichever | |
# makes the most sense for your situation. | |
after(:build) { |instance| instance.skills << create_list(:skill, 5) } | |
end | |
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
# single tag | |
find recipe | |
1 chicken alfredo | |
2 chicken pot pie | |
3 meatloaf | |
4 pasta primavera | |
5 spaghetti | |
# recipe AND chicken | |
find recipe chicken |
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(@client) do |f| %> | |
<% if @client.errors.any? %> | |
<div id="error_explanation"> | |
<h2><%= pluralize(@client.errors.count, "error") %> prohibited this client from being saved:</h2> | |
<ul> | |
<% @client.errors.full_messages.each do |msg| %> | |
<li><%= msg %></li> | |
<% end %> | |
</ul> |
NewerOlder