Episodes tagged with “active-record”
-
215
Rails 3 中的高级查询 Other translations:
Learn some advanced techniques regarding named scopes and get an introduction to Arel in this episode.
Tags: rails-30 active-record
-
202
Rails 3中的Active Record的查询变化 Other translations:
Rails 3 introduces a new query interface for performing finds in Active Record. See how it works along with the changes in named scopes.
Tags: rails-30 active-record
-
196
嵌套模型的form第一部分 Other translations:
The accepts_nested_attributes_for method, introduced in Rails 2.3, makes handling multiple models in a form much easier. Find out how to use it in this episode.
Tags: forms views active-record
-
193
非数据库数据模型 Other translations:
If you want to create a model without an associated database table all you need to do is define a couple methods in the model.
Tags: active-record
-
189
嵌入关联 Other translations:
in this episode we show you how to embed a one-to-many or many-to-many association in a single integer field.
Tags: active-record views
-
181
Include vs Joins Other translations:
The find method's include and joins options can be a little confusing as they are so similar. Find out when to use which one in this episode.
Tags: active-record
-
179
Seed Data Other translations:
Rails 2.3.4 introduces a new convention for creating any seed data that your application needs. This means that you no longer have to put seed data in your migrations.
Tags: active-record rails-23
-
178
七个安全技巧 Other translations:
Security is paramount in your Rails applications. Here we show seven commons security flaws from mass assignment to CSRF.
Tags: security forms views active-record
-
177
Model Versioning Other translations:
If you need to keep track of the changes to an ActiveRecord model and switch between versions the Vestal Versions gem is well worth considering.
Tags: active-record plugins
-
168
订阅点解析 Other translations:
In this episode we use two different techniques to parse an RSS feed with Feedzirra.
Tags: plugins active-record
-
163
自引用关联 Other translations:
In this episode we create a small social networking application and use a self-referential association to link users with their friends.
Tags: active-record controllers
-
154
多态关联 Other translations:
Polymorphic associations can be a little tricky to understand. In this episode we'll show you how to create one and use it in controllers and views.
Tags: active-record routing
-
16
Virtual Attributes Other translations:
Keep your forms flexible by adding virtual attributes to your model. This powerful technique allows you to create form fields which may not directly relate to the database.
Tags: active-record forms
