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 59 | Next

Kevin Marshall, Chad Pytel, and Jon Yurek

"Pro Active Record: Databases with Ruby and Rails"

If you are connecting to Active Record through a Rails application, you
generally provide these details in a database.yml file in your applications config directory. You
supply these connection details in YAML format. However, the YAML approach is really just Rails
syntactic shorthand for calling the ActiveRecord::Base.establish_connection method. Since
this is a book about Active Record (and not Rails), throughout our examples, we will generally
call the establish_connection method rather than use the YAML file option.
The establish_connection method expects parameters to be passed as hash values, and
each adapter has its own set of acceptable parameters. Let??™s take a look at each situation in
CHAPTER 1 ?–  INTRODUCING ACTIVE RECORD 10
detail. We will also provide an example call of the establish_connection method for each
adapter.
DB2 Parameters
The minimumDB2 requirements are the adapter and database parameters. Here is the complete
list of parameters to consider:
adapter: Specifies that this is connection information for a DB2 database.


Pages:
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6