Created
April 22, 2016 15:36
-
-
Save s-espinosa/761f478bfe9364734838e0dedcf19c9a to your computer and use it in GitHub Desktop.
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
* When and why would you rebase? | |
If you had multiple small commits that awere all related and had not yet pulled from a portion of the repository that was shared (i.e. master after the original branch). | |
* What are the steps to do a basic rebase via the command line? | |
git rebase -i HEAD~somenumber | |
* Our cart in Little Shop is not stored in the database. How does its state persist across requests? | |
Cart is stored in a session, which then gets updated as items are added, etc. | |
* Name two objects used in Rails that can be used to track state of the user across requests. | |
Cookies, sessions. | |
* Draw the MVC model and the request response cycle through a rails app. | |
request _____ router _______ some controller | |
|| || | |
view model | |
|| | |
DB | |
* Give an example of something you'd use a Rails helper for. | |
To perform a series of actions related to a task, but not inherently belonging to a controler. E.g. sending a confirmation email. | |
* How can we clean up duplicated code in the views? | |
_partials | |
* What type of variable is automatically available in a partial? | |
Instance variables. | |
* If you want to use a local variable in a partial, what syntax is used? | |
<%= render partial: "partial_name", locals: {name_in_view: name_in_controller} | |
* Describe the function and duties of the asset pipeline. | |
To pull all JS, CSS, and Images into a place where rails can access them. It also collates, minifies, and processes files, including SASS and Coffeescript. | |
* Give an example of an unacceptable use of a callback in Rails. | |
Sending an email after completing an action. Changing some related object instead of the object that's the subject of the controller. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment