16 Jun '14, 4pm

How Rails' Type Casting Works

Have you ever noticed that when you assign a property to an Active Record model and read it back, the value isn’t always the same? Here’s an example: class StoreListing < ActiveRecord::Base connection.create_table :store_listings, force: true do |t| t.integer :price_in_cents end end store_listing = StoreListing.new store_listing.price_in_cents = "100" # Note, this is a string store_listing.price_in_cents # => 100 This is because Active Record automatically type casts all input so that it matches the database schema. Depending on the type, this may be incredibly simple, or extremely complex. Let’s take a look into how the internals work in 4.1. The first method we need to understand in the above code is where the price_in_cents method is defined. In older versions of Rails, your models would go look up the database schema and define the attribute methods as soon as it was l...

Full article: http://robots.thoughtbot.com/how-rails-works-type-casting

Tweets

How Rails' Type Casting Works

rubyflow.com 17 Jun '14, 6pm

Posted by croaky on June 17, 2014 — 0 comments Have you ever noticed that when you assign a property to an Active Record m...

There's a gem for just about everything. Neeeee...

railscasts.com 16 Jun '14, 8pm

With rich client-side applications becoming more popular a common question is “Should I use Rails if all I need to do is p...

@buritica 5/13 miembros de Rails Core son de La...

rubyonrails.org 17 Jun '14, 6pm

David Heinemeier Hansson extracted Ruby on Rails from his work on Basecamp . He released the framework as open source in J...

"Fast, consistent setup for your Ruby and Rails...

rubyflow.com 17 Jun '14, 4pm

Fast, consistent setup for your Ruby and Rails tools Posted by justinweiss on June 17, 2014 — 0 comments After you build a...

We As webBox.io is a Ruby shop, we are all long...

blog.webbox.io 28 Jun '14, 10pm

We 06 April 2014 — by Uğur Özyılmazel As webBox.io is a Ruby shop, we are all long time Rails users. And we really love Ru...

#MorningCode with Ruby on Rails

twitter.com 21 Jun '14, 12am

To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content,...

Hah six years old and nothing’s changed - #rails

robots.thoughtbot.com 19 Jun '14, 3am

Jared Carroll May 29, 2007 rails So recently, I had a Rails app that raised the following exception: ActiveRecord::Multipa...

We explain a new feature in Rails 4.1: Action Pack variants

We explain a new feature in Rails 4.1: Action P...

reinteractive.net 20 Jun '14, 3am

And that's all there is to it. Variants are an extremely powerful new feature of Rails, particularly because of their flex...

Foolproof I18n Setup in Rails

robots.thoughtbot.com 17 Jun '14, 2pm

Gabe Berke-Williams June 17, 2014 rails Let’s make I18n on Rails better, quickly and easily. These tips have helped us her...

Aprende Ruby on Rails: Introducción a Ruby on R...

codejobs.biz 21 Jun '14, 5am

En el siguiente video veremos como se instala Rails en Linux, después de ello crearemos el primer proyecto utilizando MySQ...

80% Off LimTime Learn Ruby on Rails from Scratc...

udemy.com 19 Jun '14, 4pm

This course teaches you the amazing and powerful technology of Ruby on Rails. This technology forms the backend of amazing...

Ruby / Rails, possibly Active Record by ohsofox...

freelancer.com 22 Jun '14, 12am

I need some help with a short snippet of code, using either ActiveRecord or array manipulation in Ruby. Array manipulation...

Type 45 destroyer pays visit to Gibraltar

royalnavy.mod.uk 16 Jun '14, 10am

She is a superb ship and we wish Commander Nash and his whole team a successful deployment and a safe onward journey Lieut...

Foolproof I18n Setup in Rails

rubyflow.com 17 Jun '14, 6pm

Foolproof I18n Setup in Rails Posted by croaky on June 17, 2014 — 0 comments Let’s make I18n on Rails better, quickly and ...

#RubyOnRails Ruby on Rails Front-end coder need...

freelancer.com 20 Jun '14, 6am

We are looking for a ruby on rails front end coder to work with us for the next 12 hours. You will do couple of tasks. 1. ...