First Webapp

During my lunch break today, I opened up Ruby on Rails Tutorial and walked through setting up another first time app. So this is my 2nd app i’m working on.  I wanted to actually do something… so I decided to get something simple going and publish via Heroku. So what’s Continue Reading

Rails: ActiveRecord and ActiveRelation

ActiveRecord “active record” is a way of writing software (a software design pattern. )“ActiveRecord” is a rails implementation of  active record. Basically, it retrieves and manipulates db data as objects and NOT just as static rows.ActiveRecords lets the objects understand the structure and  they know how to interact with it.   Continue Reading

Rails Migrations (page 2)

Rails Migrations p2to roll a migration back, you run rake like this:rake db:migration VERSION=0 (0 tells it to go back to the beginning.) if you want to target a version, or environment you would do rake db:migration VERSION=[some version], RAILS_ENV=[some environment] The version numbers are in the “schema_migrations” table in Continue Reading

Rails: Migration (page 1)

Rails Migrations…are a set of db instructionswritten in RubyAllows you to migrate your db from one state to anotherContains both move up (to new state) and down (to a prev state) Why use it?Migrations keep the schema with the application code The Migration keeps all the db schema changes… and Continue Reading