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
<% | |
# Adds the current GIT repo to the database name. | |
parts = [ `git symbolic-ref HEAD 2>/dev/null`.chomp.sub('refs/heads/', ''), ENV['TEST_ENV'] ].compact | |
suffix = parts.length == 0 ? "" : "_#{parts.join("_")}" | |
%> | |
development: | |
adapter: postgresql | |
encoding: unicode | |
pool: 5 |
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
# If you're just using devise, it should have already loaded the current user for you | |
@user = current_user | |
@product = @user.products.build.tap do |product| | |
product.product_countries.build | |
product.product_people.build.build_person | |
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
#!/bin/sh | |
CHANGES=$(bundle exec rubocop -a -f fi) | |
if [ -n "${CHANGES//\n}" ]; then | |
git add -p $CHANGES < /dev/tty | |
fi |