Live data from Hacker News

Rails 4.1.0 beta1 released

weblog.rubyonrails.org

51–60 of 61 posts

Re: Rails 4.1.0 beta1 released

#51

Love 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 p…

Having 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.

Re: Rails 4.1.0 beta1 released

#55
post #31

Earlier quoted context omitted.

No everyone likes that approach, some people prefers to save tokens in yaml files (see on github, you will find a dozen o plugins that do same thing)

Just because you can, and others do, doesn't necessarily make it a good idea. By writing & encouraging developers to use the new `secrets` API, we expose them to a bad practise. Not only that, but other solutions exist (like using `Rails.application.config`). I'm not against configuration files per-say, I'm against secrets as persisted values in a codebase. Doing this is bad: https://github.com/search?l=ruby&q=cookie…

Presumably this would be treated just as `config/database.yml` is currently, i.e. `config/secrets.sample.yml` would be committed to the VC while `config/secrets.yml` would be ignored by the VC. When you deployed you would symlink from a shared (private) file to the secrets file.

Re: Rails 4.1.0 beta1 released

#57
post #44

Earlier quoted context omitted.

Just because you can, and others do, doesn't necessarily make it a good idea. By writing & encouraging developers to use the new `secrets` API, we expose them to a bad practise. Not only that, but other solutions exist (like using `Rails.application.config`). I'm not against configuration files per-say, I'm against secrets as persisted values in a codebase. Doing this is bad: https://github.com/search?l=ruby&q=cookie…

Wouldn't the secrets file be added to gitignore?

it shouldn't be , because thats where some people will store their keys and others will reference their ENV variables.

Re: Rails 4.1.0 beta1 released

#58
post #3

Great 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.

note that it's not "real" enum support

Re: Rails 4.1.0 beta1 released

#59

Does anyone have any links describing the new CSRF for JS GET requests? Also they misspelled CSRF in the blog post title :/

Nice catch about the title, fixed!

In the release notes: http://edgeguides.rubyonrails.org/4_1_release_notes.html#csr...

In the upgrading rails guide: http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.ht...

In the docs: http://edgeapi.rubyonrails.org/classes/ActionController/Requ...

Re: Rails 4.1.0 beta1 released

#60
post #5

wow, 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!

37signals actually has a gem called mail_view that I've been using to preview mailers: 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

What is the template engine used to parse https://github-camo.global.ssl.fastly.net/c58b91097c12fa39e4... ?
Post reply on HN