homeASCIIcasts

Episodes tagged with “active-record”

  1. 215

    Rails 3 中的高级查询 Other translations: En Es It

    Learn some advanced techniques regarding named scopes and get an introduction to Arel in this episode.

    Tags: rails-30 active-record

  2. 202

    Rails 3中的Active Record的查询变化 Other translations: En De Es It

    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

  3. 196

    嵌套模型的form第一部分 Other translations: En Es It Fr

    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

  4. 193

    非数据库数据模型 Other translations: En Es It

    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

  5. 189

    嵌入关联 Other translations: En It

    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

  6. 181

    Include vs Joins Other translations: En It

    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

  7. 179

    Seed Data Other translations: En

    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

  8. 178

    七个安全技巧 Other translations: En

    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

  9. 177

    Model Versioning Other translations: En

    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

  10. 168

    订阅点解析 Other translations: En

    In this episode we use two different techniques to parse an RSS feed with Feedzirra.

    Tags: plugins active-record

  11. 163

    自引用关联 Other translations: En

    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

  12. 154

    多态关联 Other translations: En

    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

  13. 16

    Virtual Attributes Other translations: En It Es Fr

    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