Tags

5 videos are tagged with activerecord

Capture thumb
Rating: Everyone
Viewed 490 times
Recorded at: April 23, 2015
Date Posted: May 13, 2015

So you are building an app that has a ton of forms each with tons of fields. Your heart sinks as you think of writing and managing all those models, migrations and associations. PostgreSQL JSON column and ActiveRecord::Store to the rescue! This talk covers a way to wrap these Rails 4 features to simplify the building of extensive hierarchical data models. You will learn to expressively declare schema-less attributes on your model that act much like “real" columns, meaning they are typecast, validated, query able, embeddable, and behave with Rails form builders.

Vipul amler thumb
Rating: Everyone
Viewed 1,505 times
Recorded at: June 26, 2014
Date Posted: July 21, 2014

Active Record is awesome. But how does ActiveRecord handle generating complex SQL queries? Under the hood it's handled by Arel. Most of the time, Rails developers don't have to know about how Arel works.

But sometimes Active Record can't satisfy our needs. Also Arel has many strengths not exposed through Active Record.

Let's experiment with Arel directly and wield great SQL power in database agnostic way.

Vlcsnap 2015 02 04 10h00m18s201 thumb
Rating: Everyone
Viewed 414 times
Recorded at: January 10, 2015
Date Posted:

ActiveRecord can't do it? Arel can! Active Record is awesome. But how does ActiveRecord handle generating complex SQL queries? Under the hood it's handled by Arel. Most of the time, Rails developers don't have to know about how Arel works. But sometimes Active Record can't satisfy our needs. Also Arel has many strengths not exposed through Active Record. Let's experiment with Arel directly and wield great SQL power in database agnostic way. Oh and did I mention, this is a fun talk, even for us, to “perform”.

Youtube %f0%9f%94%8a thumb
Rating: Everyone
Viewed 497 times
Recorded at: May 6, 2016
Date Posted: May 13, 2016

If you've struggled through writing complex queries in raw SQL, ActiveRecord methods are a helpful breath of fresh air. If you're not careful though, those methods could potentially leave your site open to a nasty SQL Injection attack.

We'll take a look at the most common ActiveRecord methods (and some of the lesser known ones!) with one question in mind....will it inject? If it's vulnerable to a SQL injection attack, we'll cover how to structure your query to keep your data secure.

Vlcsnap 2015 02 04 10h00m47s235 thumb
Rating: Everyone
Viewed 284 times
Recorded at: January 10, 2015
Date Posted: February 6, 2015

The talk is about the gotchas of ActiveRecord callbacks even in the most common usage patterns and touches upon some possible alternatives to avoid each of these pitfalls. As Rails developers most of us would have inevitably have run into callbacks. This is something easy to get started with but is even easier to lead you into unexpected behaviour in production. Also, due to their unobtrusive nature they can become forgotten landmines. Structured in the popular and fun “WAT” style, the focus is mostly on beginner to intermediate levels, others might find one or two anecdotes surprising.