9 ms·
Rails 4.1.0 beta1 released
- andyl 13y agoThank you Rails team - lots of useful stuff here. Really like the six-month release pace.
- annon 13y agoGreat new practical features. I can literally use every one of these, and many of them I've already been handling by rolling my own or using a gem. Surprised to see enum support finally come to activerecord.
- alxndr 13y agonote that it's not "real" enum support
- steveklabnik 13y ago> This new release also follows our new policy of targeting a minor release every > six months. The idea being that the jump from minor to minor shouldn't try to > include everything under the sun. Just whatever is ready after the six month > mark. EDIT: I have been misinformed. I didn't participate a lot in this release, and I missed some discussion. If you read my previous comment, I mentioned this was a policy change, which isn't technically true. Anyway, on to what is true: People have always complained that upgrading Rails has been difficult, we want to make that better. Releasing often will help us make a smoother upgrade path, which should help with these issues.
- mscarborough 13y agoThanks for the work, looks exciting! In addition to taking the pressure off of the rails team/community a bit, now you don't have to postpone til the next great feature can be included. I'm sure that devs knowing that what is left out now will probably be there in six months will help their planning and decision-making processes.
- gfodor 13y agowow, the action mailer preview thing is one of those things you're amazed didn't exist until now. i remember rigging this up manually a few times after getting sick of sending a million test emails to myself. great work rails team!
- mikeatlas 13y agoThe letter_opener gem is pretty handy to avoid that: https://github.com/ryanb/letter_opener https://github.com/ryanb/letter_opener Or, you could easily just create controller actions which render your emails as well: @body = mail.body.parts[1].html_part.body.raw_source render '/mailer_notification/preview.html', :layout => false And in preview.html.erb: <%= raw(@body) %>
- joshdotsmith 13y ago37signals actually has a gem called mail_view that I've been using to preview mailers: https://github.com/37signals/mail_view https://github.com/37signals/mail_view Glad this made it into Rails itself. And if you've ever wanted to put inline CSS into emails, roadie will help with that: https://github.com/Mange/roadie https://github.com/Mange/roadie
- dboyd 13y agoHat-tip to roadie. I am absolutely amazed at how well it works, and how much work it removes in producing HTML emails.
- alexvay 13y agoWhat is the template engine used to parse https://github-camo.global.ssl.fastly.net/c58b91097c12fa39e4ca809e2d4ac31fbb0f1ae3/687474703a2f2f696d6731382e696d616765736861636b2e75732f696d6731382f313036362f706c61696e746578742e706e67 https://github-camo.global.ssl.fastly.net/c58b91097c12fa39e4... ?
- purephase 13y agoI used mailcatcher. It's pretty awesome for this stuff, but glad to see it in core.
- danso 13y ago> In fact, we're already running beta1 in production for Basecamp, so you know it's been taking a good beating. This helped us catch a couple of performance regressions, and we've verified that everything is still spiffy fast on Basecamp. Wow. Well, having enough faith to run Basecamp off of it -- and the fact that 4.0 was a very smooth transition from 3.2 -- is enough reason to play around with this beta for a project. Edit: nevermind, don't think I can handle this feature removal: https://github.com/rails/rails/commit/c300dca9963bda78b8f358dbcb59cabcdc5e1dc9 https://github.com/rails/rails/commit/c300dca9963bda78b8f358... /s
- steveklabnik 13y agoI don't work at 37signals, but it's my understanding that Basecamp has often been running near HEAD Rails. Everyone on the team tries to keep some apps running on edge before a release to catch regressions.
- whalesalad 13y agoWow. These are STELLAR improvements! Check out the release notes here: https://github.com/rails/rails/blob/master/guides/source/4_1_release_notes.md https://github.com/rails/rails/blob/master/guides/source/4_1... So excited about all of it. Native enum is a blessing. Took me a while to figure it out but here is the required line for your Gemfile: gem 'rails', '4.0.1.beta1' # This works too, but isn't required (thanks to cantoniodasilva's comment below) # gem 'rails', github: 'rails/rails', tag: 'v4.1.0.beta1' Booya! Very excited to put it through the paces of this new app I am working on.
- cantoniodasilva 13y agoYou should be able to point the gem to '4.1.0.beta1' too, instead of relying on the git tag.
- whalesalad 13y agoGood to know, thanks. Note to the Rails team: might want to add this to your blog post and/or release notes? Perhaps I am the only person in the world who did not realize this would work. #noob
- chancancode 13y agoWe pushed a build to RubyGems.org[1], so you should be able drop the github option now: gem 'rails', '4.1.0.beta1' We upgraded a few apps in our local Ruby meetup group lately[2], and it's worth mentioning that you might need to upgrade the following gems too: gem 'rspec', '~> 3.0.0.beta1' gem 'rspec-rails', '~> 3.0.0.beta1' gem 'capybara', '~> 2.2.0' gem 'jquery-rails', github: 'takkanm/jquery-rails', branch:' fix_action_view_require' (I'm not 100% sure about the last one, might have been fixed since I last checked) I'll try to write this up in another blog post tomorrow. [1]: http://rubygems.org/gems/rails/versions/4.1.0.beta1 http://rubygems.org/gems/rails/versions/4.1.0.beta1 [2]: http://www.meetup.com/vancouver-ruby/messages/61805312/ http://www.meetup.com/vancouver-ruby/messages/61805312/ Edit: minor formatting fixes
- jenseng 13y agoIt's a shame these aren't actual database ENUMs, but rather ints (with the mapping in ruby land): https://github.com/rails/rails/commit/db41eb8a6ea88b854bf5cd11070ea4245e1639c5 https://github.com/rails/rails/commit/db41eb8a6ea88b854bf5cd... Even a text column would be preferable IMO ... you wouldn't need to worry about remapping if a value got removed, it's more easily queryable, and it's certainly more legible if you're looking at raw data (say, via psql). Plus you probably won't really save much (any?) space with an (64-bit) int.
- deleted 13y ago[deleted]
- 1qaz2wsx3edc 13y agoThe only issues I have with this release is that they could of waited until after the holidays. I have a feeling we'll see a security patch right before xmas. The second issue I have is `secrets` should be entirely removed from the framework. These settings should NOT be stored at the file level, it should be handled by environment flags. I feel this is a fundamentally broken feature. Spring is neat, was it just a port of Zeus into Rails?
- steveklabnik 13y ago> Spring is neat, was it just a port of Zeus into Rails? Conceptually, they're the same thing, but since Zeus is written in Go, it's totally different code. > These settings should NOT be stored at the file level, it should be handled by environment flags. I feel this is a fundamentally broken feature. I personally use environment variables to handle this case, but basically, every single approach has pros and cons, not to mention that there's legacy codebases... small steps.
- 1qaz2wsx3edc 13y ago> Conceptually, they're the same thing, but since Zeus is written in Go, it's totally different code. Thank you, this is what I wanted to hear. :) > I personally use environment variables to handle this case, but basically, every single approach has pros and cons, not to mention that there's legacy codebases... small steps. I just think it's a bloated feature when `Rails.application.config` already exists.
- danso 13y agoNo...Zeus is its own thing, AFAIK, though I guess it's described (by the Zeus maintainer) as "like Zeus but in pure Ruby, totally automatic, alpha and limited compatibility" https://github.com/burke/zeus#related-gems https://github.com/burke/zeus#related-gems I started using Zeus a couple of weeks ago and then switched over to Spring last week...I never figured out how to get the custom Zeus files to let me run regular rails/rake commands with certain flags and parameters, but Spring pretty much worked right out of the box. It works so well that I've been wary that it might cause issues in edge cases of test configuration, but haven't run into any yet...and now that it's a part of Rails, guess I'll be even less wary. It's definitely changed how I do TDD for Rails, in that I will actually do TDD for Rails, because the tests run so quickly. Yes, being hindered by Rails bootup just to run tests might be indicative of unneeded coupling, but sometimes a project doesn't require great abstraction, but still needs decent integration coverage. Spring is pretty handy for that.
- jcutrell 13y agoLove Spring. Will help every day development immensely. Thank you for the ActionMailer previews. Working on an app with a bunch of mailers - things get wily fast, and a bunch of static files sit around to be tested for display. I think the secrets.yml idea, while in development, is awesome and helpful for organization. However, I'd be a little concerned that a single file has everything secret-y in it. Maybe that's paranoia though. It'd be nice if this wasn't just a config thing that I could hand roll myself, and instead offered some sort of obscuration/security measure in and of itself.
- jbverschoor 13y agoHaving all secrets in one place is IMO a good thing, as it's unlikely you will accidently put secrets somewhere else. During deployment, you will only have to inject one file.
- deleted 13y ago[deleted]
- kawsper 13y ago> Removed deprecated threadsafe! from Rails Config. What are the consequences of this change?
- steveklabnik 13y agohttp://tenderlovemaking.com/2012/06/18/removing-config-threadsafe.html http://tenderlovemaking.com/2012/06/18/removing-config-threa...
- bazz 13y agoThank you Rails team!!
- netghost 13y agoAlways great to see new rails releases. The message signing looks pretty useful. I'm curious when people would use `Module#concerning` though?
- chancancode 13y agoThe original gem has some examples in the README https://github.com/37signals/concerning#readme https://github.com/37signals/concerning#readme
- grinnick 13y agoAnyone know a gem which will provide the secrets behaviour without waiting for this release?
- krainboltgreene 13y agofigaro, with some extra benefits
- Doctor_Fegg 13y agoGenuinely surprised that AR is only now getting enums; DataMapper has had them forever.
- aayushranaut 13y agoIs there any good tutorial site or course where I can learn more about ROR? I have a pretty solid knowledge about programming(PHP, C, C++, Objective-C) and I am getting really excited about ROR lately.
- octagonal 13y agohttp://ruby.railstutorial.org/ruby-on-rails-tutorial-book http://ruby.railstutorial.org/ruby-on-rails-tutorial-book
- aayushranaut 13y agoThanks! I'll try to finish through that huge book! :P
- steven_yue 13y agorailscasts.com
- Dirlewanger 13y agoHow different are these AR enums from, say, Simple enums?
- VeejayRampay 13y agoThat release looks awesome, congratulations to all involved.
- jasonkeene 13y agoDoes anyone have any links describing the new CSRF for JS GET requests? Also they misspelled CSRF in the blog post title :/
- chancancode 13y agoNice catch about the title, fixed! In the release notes: http://edgeguides.rubyonrails.org/4_1_release_notes.html#csrf-protection-from-remote-script-tags http://edgeguides.rubyonrails.org/4_1_release_notes.html#csr... In the upgrading rails guide: http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#csrf-protection-from-remote-script-tags http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.ht... In the docs: http://edgeapi.rubyonrails.org/classes/ActionController/RequestForgeryProtection.html http://edgeapi.rubyonrails.org/classes/ActionController/Requ...