What exactly are the "components" of Rails (ActiveRecord, ActionController, etc.)? -
i started learning rails , ruby. ruby on rails guide @ http://guides.rubyonrails.org/getting_started.html says rails consists of many different "components". of these components, such activerecord , actioncontroller, i've encountered in rails apps (in models , controllers, respectively).
the relevant syntax ("class model < activerecord::base" , "class applicationcontroller < actioncontroller::base") make these components ruby modules, if modules in files located? , how can reference them without first using ruby method "require"?
update: found of built-in modules , classes. on server, path base class of activerecord module (for example) is:
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.9/lib/active_record
but still don't know why can refer these modules , classes in our models , controllers without first using ruby's require method.
in rails app, these require
d. example if run rails command in application, through script/rails command
, script/rails
requires config/boot
requires bundler
, executes bundler.setup
requires gems in gemfile
.
Comments
Post a Comment