# RoR - Some Questions Before Starting

**URL:** <https://www.ruby-forum.com/t/ror-some-questions-before-starting/113383>\
**Category:** Rails\
**Created:** [August 30, 2007, 4:01pm UTC](https://www.ruby-forum.com/t/ror-some-questions-before-starting/113383 "2007-08-30T16:01:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![david](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/aeb1de/32.png) [@david](https://www.ruby-forum.com/u/david)\
**Post date:** [August 30, 2007, 4:01pm UTC](https://www.ruby-forum.com/t/ror-some-questions-before-starting/113383/1 "2007-08-30T16:01:35Z")

</div>

Hello everyone,  
For some time I was studying Ruby on Rails, Active Record ideology and  
other thing related with RoR right now I still know a lot more about  
PHP than RoR. I am almost ready to start writing websites using RoR  
and get more experience. But I still have some questions before  
starting and I can’t start without answers.

If you could simply answer some of them, would be great.

1. Reading about ActiveRecord (RoR) I noticed that there are some  
special tables columns which are filled/updated automatically. These  
are a few: created\_at, created\_on, updated\_at, updated\_on. There I  
could get the full list of these columns/fields names and how  
everything works? I don’t want to write code like a blind man.

2. Cookies could be accessed using cookies[:my\_coockie], using this I  
can read/create/update cookie?

3. The hole RoR application for me has one hole at least I think so at  
this point. The are controllers, actions but what about the main page?  
RoR firstly looks in the public directory and loads HTML or other  
files if it exists. There are index.htm(l), but how I can make dynamic  
index page? Rails/Ruby code inside index.htm(l) as I assume won’t  
work. So the first page must be only static? Or I should redirect user  
to some controller/action in index?

4. What is test directory for? And /libs/taks? It looks like this part  
isn’t clear for me.

5. I noticed %w[someting\_inside], but what that %w does and where I  
could read more about it?

6. Sorry for this one, but I am busy looking for some other answers  
using google and I don’t have much time. There I could find pre-  
defined variables list?

Thanks, I really appreciate for the help. I will learn it!

---

<div class="post-metadata">

**Author:** ![david](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/aeb1de/32.png) [@david](https://www.ruby-forum.com/u/david)\
**Post date:** [September 3, 2007, 6:22am UTC](https://www.ruby-forum.com/t/ror-some-questions-before-starting/113383/2 "2007-09-03T06:22:25Z")

</div>

david wrote:

> 1. Reading about ActiveRecord (RoR) I noticed that there are some  
> special tables columns which are filled/updated automatically. These  
> are a few: created\_at, created\_on, updated\_at, updated\_on. There I  
> could get the full list of these columns/fields names and how  
> everything works? I don’t want to write code like a blind man  
> [http://wiki.rubyonrails.org/rails/pages/MagicFieldNames](http://wiki.rubyonrails.org/rails/pages/MagicFieldNames)

---

<div class="post-metadata">

**Author:** ![david](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/aeb1de/32.png) [@david](https://www.ruby-forum.com/u/david)\
**Post date:** [August 30, 2007, 4:57pm UTC](https://www.ruby-forum.com/t/ror-some-questions-before-starting/113383/3 "2007-08-30T16:57:42Z")

</div>

On 8/30/07, david [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 1. The hole RoR application for me has one hole at least I think so at  
> this point. The are controllers, actions but what about the main page?  
> RoR firstly looks in the public directory and loads HTML or other  
> files if it exists. There are index.htm(l), but how I can make dynamic  
> index page? Rails/Ruby code inside index.htm(l) as I assume won’t  
> work. So the first page must be only static? Or I should redirect user  
> to some controller/action in index?

You handle this by defining a default route in config/routes.rb and  
then removing public/index.html. If you read the default  
public/index.html that Rails creates, you’ll see this answered.

> 1. What is test directory for? And /libs/taks? It looks like this part  
> isn’t clear for me.

test is for creating your application’s tests. If you use  
script/generate to generate your models and controllers, then skeleton  
test fixtures and test cases are created. Rails makes TDD really easy,  
so do it. 🙂

lib/tasks is for creating additional Rake tasks. Any .rake files in  
this directory are automatically included when you invoke Rake.

> 1. I noticed %w[someting\_inside], but what that %w does and where I  
> could read more about it?

It’s a Ruby operator that splits the stuff inside the brackets on  
whitespace and returns an array of the results. Like Perl’s qw()  
operator.

You can read more about this in the Pickaxe book (Google that)

> 1. Sorry for this one, but I am busy looking for some other answers  
> using google and I don’t have much time. There I could find pre-  
> defined variables list?

Get the Pickaxe book and “Agile Web D. with Ruby on Rails”.
