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 - Paul Grayson
Search
Las Vegas Ruby Group
April 23, 2014
0
57
What's new in Rails 4.1 - Paul Grayson
Las Vegas Ruby Group
April 23, 2014
Tweet
Share
More Decks by Las Vegas Ruby Group
See All by Las Vegas Ruby Group
Ruby ISO Standard - David Grayson
lvrug
0
130
Windows Automation - Howard Feldman
lvrug
0
68
Separating Your Application from Rails - Brian Hughes
lvrug
0
120
SWIG and Ruby - David Grayson
lvrug
0
75
Practical Object-Oriented Design in Ruby - Charles Jackson
lvrug
3
130
The Hamster Gem - Ryan Mulligan
lvrug
1
89
Varnish+Redis - Russ Smith
lvrug
1
100
Lambdas and Pops - Jan Hettich
lvrug
0
77
Making Good Use of Fonts - Russ Smith
lvrug
1
86
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.1k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.1k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.6k
RailsConf 2023
tenderlove
30
1.2k
Testing 201, or: Great Expectations
jmmastey
45
7.7k
Building a Modern Day E-commerce SEO Strategy
aleyda
43
7.7k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
61k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
Thoughts on Productivity
jonyablonski
70
4.9k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
54
3k
Transcript
What's new in Rails 4.1 Paul Grayson Las Vegas Ruby
User Group 2014-04-23
What's new in Rails 4.1 • 5210 commits (1469 pull
requests) • 601 authors • Work done 2012-12-09 to 2014-04-08 • v4.0.0.rc1 released 2013-04-29 • v4.0.0 released 2013-06-25 • v4.1.0 released 2014-04-08 git log v4.1.0 --not v4.0.0
Spring application preloader used by default • Keeps a server
running constantly • Hopefully auto-loads your files
config/secrets.yml • Standard place to keep secrets so they won't
be checked into git • Not added to .gitignore in 4.1.0 (!) • No support for deploying this file • You probably still need to use ENV
Action Pack Variants • Custom pages intended for different devices
• Examples are all about USER_AGENT • Not much documentation, but it's simple • Please don't use this!
Action Mailer Previews • Looking at your mailers in a
browser • Formerly the MailView gem from 37signals http://localhost:3000/rails/mailers
Action Mailer Previews
Active Record enums • NOT native database enums • Stored
as integers class Conversation < ActiveRecord::Base enum status: [ :active, :archived ] end conversation.active? converstaion.active! Converstaion.active.each { ... }
Message Verifiers • Was previously used only for cookies •
Now available for unsubscribe links, etc. • Vulnerable to replay attacks, so use sparingly
Module#concerning • Formerly the concerning gem by 37signals • Good
for cleaning up “junk-drawer classes” class Todo concerning :EventTracking do included do has_many :events end class_methods do def next_by_event # ... end end end end
CSRF protection for .js requests • Protects against some obscure
attacks • You will need to provide tokens for AJAX
Load structure.sql instead of db:test:prepare • This file should be
in source control • Ensures that everyone is testing the same DB
Discussion