Riding The Breeze

Jump to content

Additional information

Categories


Posts filed in ‘Travelling on Rails’


Rails API with the AJAX flavor

May 2007
10

http://www.railsbrain.com/


Ruby on Rails cheat sheet

Mar 2007
15

All the commands you need in one page


Names

Nov 2006
16
Table
friends | Stores data
Model
Friend | Data validation & relationships like belongs_to or belongs_to
Controller
friend | Says what to do and where to do it

Commands

Feb 2006
24

Module name Friend | Table name friends

Create the module

./script/generate controller Friends [list view new edit]

creates

apps/controllers/friends_controller.rb

apps/helpers/friends_helper.rb

if you specify any actions you will also get

app/view/friends/action.rhtml

To generate the model

./script/generate model Friend

If you wanna use the scaffold for this module just open

apps/controllers/friends_controller.rb

and modify it to

class FriendsController < ApplicationController
scaffold :friend
end

For a short and fast explanation about names in RoR have a look to Rails Tip Sheet


Plugin not found: engine

Feb 2006
15

If running this command :

./script/plugin install engines

you get the message:

Plugin not found: engines

Is because none of the server listed in your plugin sources has the engine plugin.

So, open the file .rails-plugin-sources

vi ~/.rails-plugin-sources

and add this line

http://opensvn.csie.org/rails_engines/plugins/

This source has the engine plugin and many other listed at http://rails-engines.org/


Paging

Credits

Template designed by praegnanz.de.