开发者

Rails: models and database tables

Rails newbie here. If I have a mod开发者_StackOverflow社区el and a table associated with it, can I refer to the table's attributes??


Yes. ActiveRecord maps tables to your models.

You can inspect the official ActiveRecord tutorial: http://guides.rubyonrails.org/active_record_querying.html


Yes, ModelName.attribute_name should do it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜