Copy/paste the following code block into your terminal.
# Downloading latest
wget http://download.redis.io/redis-stable.tar.gz| #! /bin/bash | |
| set -e | |
| BRANCH=$(git rev-parse --abbrev-ref HEAD) | |
| REMOTE=$(git remote get-url origin) | |
| URL="$REMOTE/compare/$BRANCH?expand=1"; | |
| if [ "$BRANCH" = "master" ] | |
| then | |
| echo You must checkout a feature branch first |
| #!/bin/sh | |
| branch="$(git rev-parse --abbrev-ref HEAD)" | |
| # get computer name to append in Chime message | |
| username=$USER | |
| # a branch name where you want to prevent git push. In this case, it's "master" | |
| if [ "$branch" = "master" ]; then | |
| echo "You can't commit directly to '"${branch}"' branch" # webstorm or intellij will show this as popup |
###So you want to become a full-stack developer: What? Why?
###For beginners:
| { | |
| "keys": ["tab"], | |
| "command": "expand_abbreviation_by_tab", | |
| // put comma-separated syntax selectors for which | |
| // you want to expandEmmet abbreviations into "operand" key | |
| // instead of SCOPE_SELECTOR. | |
| // Examples: source.js, text.html - source | |
| "context": [ | |
| { |
belongs_to association does not automatically save the object. It does not save the associated object either.has_one association, that object is automatically saved (in order to update its foreign key).has_one association) is unsaved (that is, new_record? returns true) then the child objects are not saved. They will automatically when the parent object is saved.Setup RSpec and Capybara on a new Rails engine
rails plugin new ENGINE_NAME --full --database=mysql
Add to gemspec:
s.add_development_dependency 'rspec-rails'
s.add_development_dependency 'shoulda-matchers'
s.add_development_dependency 'capybara'
s.add_development_dependency 'database_cleaner'
| require 'dm-core' | |
| require 'dm-migrations' | |
| DataMapper.setup(:default, "mysql://localhost/test") | |
| class TotallyContrivedForThisExample | |
| include DataMapper::Resource | |
| property :id, Serial # already part of the primary key | |
| property :plerp, String, :key => true # Adds this to the primary key |