Prev | Current Page 24 | Next

David Berube

"Practical Reporting with Ruby and Rails"

Active
Record is a simple way to access databases and database tables in Ruby. It is a powerful
object-relational mapping (ORM) library that lets you easily model databases using an
object-oriented interface. Besides being a stand-alone ORM package for Ruby, Active
Record will also be familiar to web application developers as the model part of the webapplication
framework Ruby on Rails (see http://ar.rubyonrails.org/).
Active Record has a number of advantages over traditional ORM packages. Like the
rest of the Rails stack, it emphasizes configuration by convention. This means that Active
Record assumes that your tables and fields follow certain conventions unless you explicitly
tell it otherwise. For example, it assumes that all tables have an artificial primary key
named id (if you have a different primary key, you can override it, of course). It also
assumes that the name of each table is a pluralized version of the model (that is, class)
name; so if you have a model named Item, it assumes that your database table will be
named items.


Pages:
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
torby reklamowe dowcipy stoiska na targi teksty piosenek bida Optymalizacja stron