Upgrade to rails 4.1?

Hello, Do we need to upgrade to the latest version of rails 4.1? and will the etsydemo still work.

Posted over 5 years ago by neil
Posted over 5 years ago by neil

ok thanks!

0
Posted over 5 years ago by Alex Yang

Yes, Etsydemo will still work. Waihon's adjustment is the only change I've identified so far. You can read more about upgrading from Rails 4.0 to Rails 4.1 here: http://guides.rubyonrails.org/upgrading_ruby_on_rails.html#upgrading-from-rails-4-0-to-rails-4-1.

And if you want to read more about the new features that were added in Rails 4.1, check out this link: http://edgeguides.rubyonrails.org/4_1_release_notes.html

0
Posted over 5 years ago by Waihon Yew

I've just signed up BaseRails about 2 weeks ago. I've been using Rails 4.1 since day 1. I've completed 7 chapters so far. The only version compatibility issue I encountered thus far was in chapter "7. Add Users: Customize Devise Forms and Alerts".
To make the flash message displayed in appropriate color, in application.html.erb, you'd need to replace the following statement...
<div class="alert alert-<%= name == :notice ? "success" : "danger" %> alert-dismissable">
with...
<div class="alert alert-<%= name.to_s == 'notice' ? "success" : "danger" %> alert-dismissable">
The Rails flash message hash contains a key (a "name") and a value (the "message").
Under Rails 4.0, the key is a Symbol.
Under Rails 4.1, the key is a String.

0