人気ブログランキング | 話題のタグを見る

RoR scaffold app/models app/helpers

app ディレクトリ内には、controllers, views 以外に models と helpers というサブディレクトリがあるが、それらの中のファイルはデフォールトのままでほとんど空だった。

~/console/rails/demo$ ls app
controllers helpers models views
~/console/rails/demo$ ls app/models
user.rb
~/console/rails/demo$ cat app/models/user.rb
class User < ActiveRecord::Base
end
~/console/rails/demo$ ls app/helpers
application_helper.rb users_helper.rb
~/console/rails/demo$ cat app/helpers/application_helper.rb
# Methods added to this helper will be available to all templates in the application.
module ApplicationHelper
end
~/console/rails/demo$ cat app/helpers/users_helper.rb
module UsersHelper
end
by tnomura9 | 2008-10-14 05:55 | Ruby | Comments(0)
<< RoR scaffold まとめ RoR scaffold ap... >>