Features in Rails 4.0 -- presented at @houstonrb
Rails 4: Appetizers@jwo for @houstonrbWednesday, July 10, 13
View Slide
RubiesRuby 1.9.3 at least, prefer 2.0Rails 2.3 => End of LifeRuby 1.8.7 => End of LifeWednesday, July 10, 13
Bootup timefaster on Ruby 2.0 with Rails 4How fast?Cray Cray FasterWednesday, July 10, 13
Cache DigestsCaches the view (partials) by theupdated_at columnWednesday, July 10, 13
Best if you have a upper-mostsite object.Example: Basecamp has anupper-most Account object.Cache DigestsWednesday, July 10, 13
So: Add a Site object that hasupper-most updated at.Cache DigestsWednesday, July 10, 13
Will help with sidebar that doesnot directly belong to a Post.Cache DigestsWednesday, July 10, 13
Uses JavaScript to pull only the tagTurbolinksWednesday, July 10, 13
Speeds up document based sitesTurbolinksWednesday, July 10, 13
Most everybody should addjquery-turbolinksTurbolinksWednesday, July 10, 13
Watch out for:TurbolinksWednesday, July 10, 13
External javascript (stripe)Data tags on the body objectthings in the `` like`` tags<br/>Tubolinks<br/>Wednesday, July 10, 13<br/>
Most everything, everWednesday, July 10, 13
Moves Mass Assignmentprotection to the controllersStrong ParametersWednesday, July 10, 13
you have to manually removeattr_accessible if upgradingStrong ParametersWednesday, July 10, 13
PostgreSQL Additionshstore: JSON store, attributes,better Single Table InheritanceWednesday, July 10, 13
PostgreSQL AdditionsArrays: tagging, parent childancestryWednesday, July 10, 13
Arel Changesfind_by_customer_id => lives!find(:all, conditions:["customer_id = ?", 45]) => DEADfind(customer_id: 45) => newWednesday, July 10, 13
Arel Changesfind_or_create_by_customer_id()=> deadfind_or_create_by(customer_id:45) => new!Wednesday, July 10, 13
Arel Changeswhere(id: 45).first_or_create =>new hotness.all => deprecatedWednesday, July 10, 13
Scope Changesscope :future, where("created_at> ?", Time.now) => syntax errorWednesday, July 10, 13
Scope Changesscope :future, →{ where("created_at > ?",Time.now) }Wednesday, July 10, 13
MultiThreadedIt's on, baby!Wednesday, July 10, 13
Moved to GemsObserversActiveRecord SessionStoreActiveResource LOLAction & Page CachingWednesday, July 10, 13
Test Directoriestest/unit => test/modelstest/functional => test/controllersWednesday, July 10, 13
MiscGemfile has no Assets sectionConcerns directory is prevalentWednesday, July 10, 13
Misc/bin shows up (binstubs)Plugins must be moved to libWednesday, July 10, 13
MiscActionController::Live => (notalot of attention)Patch verb in RESTWednesday, July 10, 13
Miscbefore_filters are nowbefore_actionWednesday, July 10, 13
Didn't Make itQueue APIAsync MailersWednesday, July 10, 13
get more informationhttp://blog.wyeworks.com/Rails Conf 2013 Postgres, theBest Tool You're Already UsingWednesday, July 10, 13
get more informationhttp://rails-upgrade-checklist.comhttp://upgradingtorails4.comhttp://upgradingrails.comWednesday, July 10, 13
Thanks!I’m @jwoWednesday, July 10, 13