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
# deploy to staging from your current topic branch, with ease | |
set :branch, "origin/#{`git branch`.scan(/^\* (\S+)/)}" |
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
# Examples of Nesting Associated Attributes | |
# This is a look at the various ways to set associated attributes through | |
# nested parameters. For example, let's say Project has_many :tasks and | |
# we want to update the tasks the same time we edit a project. There are | |
# several ways this interface could be handled, and here are a few. | |
# | |
# For these examples, we're trying to create two new tasks and update an | |
# existing task (with id 3) through a project. | |
# Approach 1 |