homeASCIIcasts

Episodes tagged with “active-record”

  1. 251

    MetaWhere & MetaSearch Other translations: Ja Es

    MetaWhere provides a way to do complex find conditions without SQL in Active Record. MetaSearch makes it easy to create search forms with many find options.

    Tags: rails-3.0 plugins active-record forms search

  2. 239

    ActiveRecord::Relation Walkthrough Other translations: Es

    The new Active Record query methods in Rails 3 might seem like magic at first. In this episode we unravel how it works by browsing the Rails 3 source code.

    Tags: rails-30 active-record

  3. 217

    Multistep Forms Other translations: It Es

    In this episode we create a multistep form, or wizard, from scratch.

    Tags: forms views active-record

  4. 215

    Advanced Queries in Rails 3 Other translations: Es It Cn

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

    Tags: rails-30 active-record

  5. 212

    Refactoring & Dynamic Delegator Other translations: Es It

    Learn how to refactor a set of conditional Active Record queries using a Dynamic Delegator.

    Tags: refactoring active-record rails-30

  6. 211

    Validations in Rails 3 Other translations: Es It

    Rails 3 offers several new additions to validations. Here learn how to make a custom error_messages partial, reflect on validations, and clean up complex validations in a model.

    Tags: rails-30 forms active-record views

  7. 202

    Active Record Queries in Rails 3 Other translations: Cn 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

  8. 196

    Nested Model Form Part 1 Other translations: Es It Fr Cn

    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

  9. 193

    Tableless Model Other translations: Es Cn 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

  10. 189

    Embedded Association Other translations: Cn 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

  11. 181

    Include vs Joins Other translations: Cn 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

  12. 135

    Making a Gem

    Gems are now a more popular way of extending Rails than plugins. In this episode we go through the steps needed to create a basic gem.

    Tags: plugins active-record tools

  13. 179

    Seed Data Other translations: Cn

    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

  14. 178

    Seven Security Tips Other translations: Cn

    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

  15. 177

    Model Versioning Other translations: Cn

    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

  16. 33

    Making a Plugin Other translations: It

    Duplication can often be removed from your Ruby code by making methods dynamically. In this episode we make a plugin to do just that.

    Tags: active-record plugins

  17. 176

    Searchlogic

    Searchlogic uses named scopes to make searching against models simple. See how to create simple and more complex searches in this episode.

    Tags: active-record plugins

  18. 168

    Feed Parsing Other translations: Cn

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

    Tags: plugins active-record

  19. 163

    Self Referential Association Other translations: Cn

    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

  20. 162

    Tree Based Navigation

    The acts_as_tree plugin provides a good solution for handling a tree-based navigation. In this episode we build a navigation system with menus, subpages and a breadcrumb control.

    Tags: active-record plugins

  21. 154

    Polymorphic Association Other translations: Cn

    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

  22. 152

    Rails 2.3 extras

    A round of some of the smaller new feaures in Rails 2.3 to finish the short series on Rails 2.3.

    Tags: rails-23 active-record active-support

  23. 32

    Time in Text Field Other translations: It

    Updating time fields via a series of dropdowns isn't the most elegant way to enter date and time information. Find out how to allow your users to enter dates and time in a text field instead.

    Tags: active-record forms

  24. 147

    Sortable Lists

    Find out how to create a drag and drop list using prototype and one of Rails’ helper methods.

    Tags: active-record plugins ajax routing

  25. 26

    Hackers Love Mass Assignment Other translations: It

    If you're using mass assigment you're giving complete control to your models to your users. Learn how to protect them in this episode.

    Tags: security active-record forms

  26. 25

    SQL Injection Other translations: Id It

    Attacks via SQL injection are one of the most common ways to attack web applications. Learn how to avoid being a victim of it.

    Tags: security active-record forms

  27. 23

    Counter Cache Column Other translations: It

    Improve performance by caching the record count for a has_many association in a counter cache column.

    Tags: performance active-record

  28. 22

    Eager Loading Other translations: It

    Improve the performance of your Rails application by reducing the number of database queries. Eager loading makes it easy.

    Tags: performance active-record

  29. 16

    Virtual Attributes Other translations: Cn 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

  30. 15

    Fun With Find Conditions Other translations: It Es Fr

    You can pass objects other than strings to find conditions, but care must be taken to ensure that the correct SQL is generated.

    Tags: active-record

  31. 14

    Performing Calculations On Models Other translations: It Es Fr

    ActiveRecord provides class methods for performing calculations on models. See how in this episode.

    Tags: active-record

  32. 5

    Using with_scope Other translations: It Es Kr Fr

    Learn how to use with_scope - a very powerful method which will allow your custom find method to acceps any find options.

    Tags: active-record

  33. 4

    Move Find Into Model Other translations: It Es Fr

    Clean up your controllers and remove duplication by moving a find into your model. Use an association to call custom find methods.

    Tags: active-record

  34. 3

    Find Through Association Other translations: It Es Fr

    Use a has_many association in a find to avoid the need to pass foreign keys.

    Tags: active-record

  35. 2

    Dynamic find_by Methods Other translations: It Fr Es Kr Pl Pt

    Shorten simple find and improve readability by using the dynamic find_by and find_all_by methods.

    Tags: active-record