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
Lauro Caetano
January 28, 2014
Programming
100
0
Share
What's new in Rails 4.1
Lauro Caetano
January 28, 2014
More Decks by Lauro Caetano
See All by Lauro Caetano
Learning Elixir by Examples
laurocaetano
1
240
Garbage Collection em Ruby
laurocaetano
2
140
Clojure Introduction.
laurocaetano
1
78
Other Decks in Programming
See All in Programming
PHPで TLSのプロトコルを実装してみるをもう一度しゃべりたい
higaki_program
0
150
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
280
ローカルで稼働するAI エージェントを超えて / beyond-local-ai-agents
gawa
1
230
AI時代の脳疲弊と向き合う ~言語学としてのPHP~
sakuraikotone
1
1.8k
おれのAgentic Coding 2026/03
tsukasagr
1
120
20260313 - Grafana & Friends Taipei #1 - Kubernetes v1.36 的開發雜記:那些困在 Alpha 加護病房太久的 Metrics
tico88612
0
250
飯MCP
yusukebe
0
460
GC言語のWasm化とComponent Modelサポートの実践と課題 - Scalaの場合
tanishiking
0
140
AWS re:Invent 2025の少し振り返り + DevOps AgentとBacklogを連携させてみた
satoshi256kbyte
2
120
Linux Kernelの1文字のミスで 権限昇格ができた話
rqda
0
2.2k
野球解説AI Agentを開発してみた - 2026/02/27 LayerX社内LT会資料
shinyorke
PRO
0
390
メッセージングを利用して時間的結合を分離しよう #phperkaigi
kajitack
3
540
Featured
See All Featured
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
230
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
250
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
170
A Modern Web Designer's Workflow
chriscoyier
698
190k
Un-Boring Meetings
codingconduct
0
250
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
ラッコキーワード サービス紹介資料
rakko
1
2.9M
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
A Tale of Four Properties
chriscoyier
163
24k
Exploring anti-patterns in Rails
aemeredith
3
300
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
260
Thoughts on Productivity
jonyablonski
76
5.1k
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