SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 135 | Next

Kevin Marshall, Chad Pytel, and Jon Yurek

"Pro Active Record: Databases with Ruby and Rails"

Now, let??™s compare that process to the steps that a programmer goes through
using Active Record migrations:
1. Create a connection for your Active Record program to your database. This is generally
done through a YAML configuration file or through the ActiveRecord::Base.establish_
connection method.
2. Create and execute Ruby scripts using the Active Record migration DSL syntax and rules.
3. Start writing your application logic.
4. Load data into your testing database manually with your database administration
program, through some batch SQL scripts, through custom-built web or application
administration tool, or via fixtures with your migration scripts.
5. Test, release, repeat.
CHAPTER 3 ?–  SETTING UP YOUR DATABASE 47
At first glance, this process may not seem that much different than the traditional approach.
However, after closer examination, you will see the following key differences and that those
differences directly address the common problems with the traditional approach:
??? Everything is done from within Ruby scripts.


Pages:
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6