Jonathan B. Abatayo

My personal blog.

Tuesday, October 31, 2006

Creating projects in rails

Create Project:
  • rails <project name>
Run the server:
  • mongrel_rails start -p <port> -d
Migrate:
  • rake migrate
  • rake migrate VERSION=<version number>
Generate scripts:
  • ruby script/generate model <model name>
  • ruby script/generate controller <controller name>
  • ruby script/generate migration <migration name>
  • ruby script/generate plugin <plugin name>

How To Install Ruby On Rails In Windows

$ gem install rails --include-dependencies
$ gem install win32-service
$ gem install mongrel
$ gem install mongrel_service

Sample Codes in phptarsier Ajax

Ajax::remote_form
Ajax::remote_anchor

<div id="placeholder"> </div>

<?= Ajax::remote_anchor('Fill in the Blanks',
     array(t_action => 'ajax_fill'),
     array(
       'update' => 'placeholder',
       'success' => Html::effects:highlight
     )
) ?>