Aston J

Posts Tagged ‘ruby’

Rails mass assignment security

Posted on: March 6th, 2012 by AstonJ 5 Comments

While Rails does a lot to secure your app, some things it leaves to you (as one size doesn’t fit all) and mass assignment security (MAS) is one such example. Rails does of course, make it easy for you to bolt things up, here’s how.

When will you need MAS?

Whenever you are accepting data from users, such as from a form via a params[:hash] and using update_attributes (and family) eg:

Advanced Ruby & Rails books

Posted on: December 3rd, 2011 by AstonJ 1 Comment

This is the sequel to my Best way to learn Ruby & Rails post, if you’re new (or fairly new) to Ruby or Rails, read that first. In this post we look at books that help to get you from intermediate level to pro, although you’ll have to bear with me as this is currently my own journey too – and so this post will probably get edited, re-edited often (mainly to change the order of books).

Ruby Koans Answers

Posted on: November 30th, 2011 by AstonJ 2 Comments

Looking for the answers to Ruby Koans? Well you’re not going to get them here! But what I will do is show you how to get them and who to ask if you get stuck.

The Pragmatic Bookshelf – my favourite tech publisher

Posted on: November 29th, 2011 by AstonJ No Comments

Having purchased quite a few programming books from various publishers recently, one has quickly become a firm favourite; The Pragmatic Bookshelf (AKA The Pragmatic Programmers.)

Setting up a Ruby dev enviroment on Lion

Posted on: November 24th, 2011 by AstonJ 3 Comments

This post is part of my series on Clean Lion install for Ruby Development.

Next we’ll set up our fresh dev enviroment for Ruby. Here we’ll cover installing and setting up:

  • GCC (or Xcode)
  • Homebrew
  • Xcode
  • Rbenv or RVM
  • Ruby 2.1.3
  • Rubygems
  • Rails
  • POW – Optional
  • MySQL & Unix set-up


Clean Lion install for Ruby Development

Posted on: November 24th, 2011 by AstonJ No Comments

I know there’s a few of these posts around, but I wanted to do one purely for my own notes if nothing else. Particularly as I will be setting things up a little differently (partly because I have just installed a SSD and will be using more than one drive and…) because some of the other posts are already out of date, especially since the latest update of Xcode which does not come with GCC. You are welcome to follow this guide, but remember you do so at your own risk.

(Pretty much works for Mountain lion too.)

Best way to learn Ruby & Rails

Posted on: October 9th, 2011 by AstonJ 55 Comments

That’s no typo, I really did mean Ruby and Rails – but before you run off (those looking to learn only Rails) read on… I started off wanting to learn just Rails too, but I quickly realised two things:

  • Rails will only get you so far – to be anything close to a Rails ninja, you need to learn Ruby (Rails is Ruby underneath it all). While Rails goes out of its way to simplify a lot, once you begin to do more complex stuff you’re going to need to know Ruby – and because Ruby is so easy to pick up anyway it makes sense to learn it from the outset. It will not only save you time in the long run, but will also help you learn Rails as well, because you’ll have a better understanding of what’s going on.
  • Even if you came for Rails, most likely you will stay for Ruby – like so many of us! The more you’re exposed to Ruby the more you’ll want to learn it. Ruby is an awesome all-purpose language with a multitude of uses (it’s not just for web apps!) so is well worth adding to your repertoire. Trust me, it will quickly become your favourite language, but if you still need convincing, check out this post.


Why RailsCasts deserves to be a success

Posted on: October 5th, 2011 by AstonJ 4 Comments

….and why it will be. has been going almost as long as Rails itself – and it’s always been free. Ryan’s produced almost 300 quality screencasts, and if you average them out to 10 minutes each, that’s about 50 hours of footage!

What’s special about Ruby?

Posted on: September 5th, 2011 by AstonJ 15 Comments

Would you believe this is my third attempt at writing this piece? The last two were waaaay too long (there’s just so much to cover!) Well let’s start with a few stand-out thoughts on Ruby:

  • Ruby is an object of beauty –> inspired & passionate developers
  • It’s elegant and concise –> a joy to work with
  • Easy to learn but very powerful –> more experienced developers
  • Is designed for programmer happiness –> all of the above


What the hell is happening to Rails? Answerback.

Posted on: June 18th, 2011 by AstonJ 21 Comments

This is an answerback to the recent ‘What the hell is happening to rails?’ post by Steve Coast. He says Rails has become too hard/advanced for beginners, and recommends they ditch learning Rails 3 and go with an older version:

If you want to learn rails, don’t get the latest pragmatic programmers book. Go and get the 1st or 2nd edition. Get an old copy of rails and ignore all this. Once you’ve figured that all out then upgrade and expect to spend the same amount of time learning all the new stuff. You don’t save any time jumping to Rails 3+. You will love rails if you begin at the start like we all did, but you might hate it starting off with 3.

I disagree – in fact I strongly recommend you don’t take Steve’s advice or his post too seriously.