Merge pull request #1 from xspager/master

Syntax highlight on the README.md
Merge pull request #2 from xspager/master

Minor style changes
Alternative to setfenv

Setfenv was only compatible with lua 5.1 and now it is possible to run it on
 5.2 as well.
Merge branch 'master' of github.com:Etiene/sailor
Sending page object into view file

It's preferable to have 'page' in the environment than 'r' for two reasons:
1 - Apache x other servers future compatibility
2 - Page already contains r anyway
Improving routes

Now you are able to configure a default render page or default
controller/action.
Using getlastautoid() on db

Less hassle and hopefully more compatible.
Escaping some db functions on model

Might or might not avoid SQL injections now.
Changing db to an object

Might avoid problems from many clients accessing at the same time.
Documentation on db module

Because this is a good thing.
Improved routing organization

Now the page object recognizes from which controller it is being rendered from
and the view files of each controller should be found under a subdir inside
views dir. Also separated my test pages in a test controller.
Fixing a bug on mailer module and making pretty test pages

Now the mailer example stuff are under a mailer action inside the test
controller that renders /views/test/mailer.lp
A bit of models testing
Starting a form generator
Starting validation module

This validation is used in chains. Example:
 local _,err = validation.check("test string!").type("string").len(3,5)
Checks are made from left to right. If a check fails it stops the chain
meaning it doesn't verify the others and propagates the error.
Update README.md
Rewrote validation module

Now the value to be validated is placed at the end of the chain allowing reuse
and other facilities.

Example 1:
  validation:new().type("string").len(3,5)("test string!") -- false
Example 2:
  local reusable_validation = validation:new().type("string").len(3,5)
  reusable_validation("test string!") -- false
  reusable_validation("test!") -- true
Merge branch 'master' of github.com:Etiene/sailor
Validation rules and validate method for models

Just add the rules in the attributes inside the model using this pattern:
 <attribute> = { <valfunc> = {<args>}, ... }
Example: password = { not_empty = {}, len = {6,10} }
Applying post to model

With model:get_post(post) and autogenerated forms now models are able to
catch attributes from POST.