Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
What's new in Rails 4.1
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Lauro Caetano
January 28, 2014
Programming
0
100
What's new in Rails 4.1
Lauro Caetano
January 28, 2014
Tweet
Share
More Decks by Lauro Caetano
See All by Lauro Caetano
Learning Elixir by Examples
laurocaetano
1
230
Garbage Collection em Ruby
laurocaetano
2
140
Clojure Introduction.
laurocaetano
1
77
Other Decks in Programming
See All in Programming
文字コードの話
qnighy
44
17k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
670
RAGでハマりがちな"Excelの罠"を、データの構造化で突破する
harumiweb
9
2.9k
AI活用のコスパを最大化する方法
ochtum
0
110
20260315 AWSなんもわからん🥲
chiilog
2
160
[SF Ruby Feb'26] The Silicon Heel
palkan
0
110
encoding/json/v2のUnmarshalはこう変わった:内部実装で見る設計改善
kurakura0916
0
420
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
300
Symfony + NelmioApiDocBundle を使った スキーマ駆動開発 / Schema Driven Development with NelmioApiDocBundle
okashoi
0
140
AIコードレビューの導入・運用と AI駆動開発における「AI4QA」の取り組みについて
hagevvashi
0
500
ふつうのRubyist、ちいさなデバイス、大きな一年 / Ordinary Rubyists, Tiny Devices, Big Year
chobishiba
1
460
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
390
Featured
See All Featured
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
140
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
290
Building Flexible Design Systems
yeseniaperezcruz
330
40k
The Limits of Empathy - UXLibs8
cassininazir
1
260
Building an army of robots
kneath
306
46k
Amusing Abliteration
ianozsvald
0
130
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
Building AI with AI
inesmontani
PRO
1
800
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
ラッコキーワード サービス紹介資料
rakko
1
2.7M
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
250
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Transcript
What’s new in Rails 4.1 Lauro Caetano 28/01/2014
Major Features
Spring
! # bundle exec spec spec/models/book_spec.rb! # 15.30s user 1.63s
system 99% cpu 16.976 total! 12 examples, 0 failures ! ! # bin/spring rspec spec/models/book_spec.rb! # 1.01s user 0.10s system 17% cpu 6.453 total! 12 examples, 0 failures
config/secrets.yml
# config/secrets.yml! development:! secret_key_base: 3b7cd727ee24e8444053437! some_api_key: SOMEKEY! ! ! Rails.application.secrets.some_api_key!
# => SOMEKEY!
Action Pack Variants
class ApplicationController < ActionController::Base! def some_action! respond_to do |format|! format.html
do |html|! html.tablet ! html.phone! end! end! end! end! ! # in app/views/projects/show.html+tablet.erb! # in app/views/projects/show.html+phone.erb
class ApplicationController < ActionController::Base! def some_action! respond_to do |format|! format.js
{ render "trash" }! format.html.phone { redirect_to progress_path }! format.html.none { render "trash" }! end! end ! end
Action Mailer Previews
class NotifierPreview < ActionMailer::Preview! def welcome! Notifier.welcome(User.first)! end ! end!
# => http://localhost:3000/rails/mailers! # in /test/mailers/previews/notifier_preview.rb
Active Record Enum
class Conversation < ActiveRecord::Base! enum status: [:active, :archived]! end! !
conversation.archived!! conversation.active?! # => false! conversation.status! # => "archived"! ! Conversation.archived! # => Relation for all archived Conversations!
class Conversation < ActiveRecord::Base! enum status: { active: 0, archived:
1 }! end! ! conversation.archived!! conversation.active?! # => false! conversation.status! # => "archived"! ! Conversation.archived ! # => Relation for all archived Conversations!
Message Verifiers
signed_token = Rails.application! .message_verifier("remember_me")! .generate(“some data")! ! Rails.application.message_verifier("remember_me")! .verify(signed_token)! #
=> some data!
Removals, Deprecations and notable changes ! https://github.com/rails/rails/blob/master/guides/ source/4_1_release_notes.md