Skip to content

tiy-austin-ror-may2015/tips

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

Ruby and Rails Tips

New Rails Project Setup

Deploying to Heroku

##Git Procedures ####Create a New Branch (or navigate to existing)

  1. cd into main project folder
  2. to create a new branch use: git checkout -b (branchname) -if you've already created your branch: git checkout (branchname)
  3. make sure you have all the most current changes from master: git pull origin master
  4. Now you can begin working in your branch ####To Commit New Changes to Master
  5. git add .
  6. git commit -m "Commit message"
  7. git pull origin master
  8. git checkout master
  9. git merge (branchname)
  10. git push origin master
  11. git checkout (branchname)

Rails-isms

  • Models are ruby classes that inherit from ActiveRecord::Base
  • Models are singular in rails User, Student, and Todo
  • Controllers are pluralized in rails UsersController, StudentsController, and TodosController
  • Database table names are plural in rails users, students, and todos
  • There is (typically) one folder in views for each model you've created. It is the pluralized version of the model name and holds all the html/erb templates for that model's controller. For example: the User model will have an action index on the UsersController that will render the users/index.html.erb template.

Ruby Gotchas (so many)

Problem Solving

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •