Accessing instance variables within a Rspec controller test

posted in today-i-learned


If you have ever tried to write functional tests for a controller, you will know that they can be a little tricky. One such trip up point that I ran into was accessing instance variables from within the controller spec. You can't just use expect(@variable).to be_valid because @variable is an instance variable and won't be defined in your spec's scope.

The year in review (2015)

posted in series


In this first issue of "Year in review", I will detail a few key topics. In the first section I will list any recent development news that I have come across. The next section will detail any notable gems, extensions, or app. Then in the last section I will list any blog posts from other developers which I have found helpful and informative.

Drying out your content with Ruby on Rails Internationalization

posted in article


Internationalization is an important topic for many corporations that have a multi-national client base. It allows for easy translation capabilities and helps to protect the future of the application against code debt. However, even if you are not providing translations for your application you can still use internationalization to dry up your content. Let's get started.

Restrict an integer to a specific range in Ruby

posted in today-i-learned


Ever wanted an integer to be allowed a specific range of valid numbers rounding when necessary? Well, unfortunately in the Ruby community this has been a point of contention because no built-in function exists. We can however easily replicate the intended behavior through the clever usage of the enumerable sort method.

Rails 4 turbolinks fix for jQuery only working after hard refresh

posted in today-i-learned


The Rails asset pipeline uses a feature called Turbolinks for serving faster CSS and JS assets to the browser. It works by using AJAX to re-load assets without refreshing the page. Unfortunately, it also can mess up scripts that work with the document ready event such as jQuery. The only way to make the assets work is with a hard refresh. Let's fix this.

Getting up and Running with Minitest, Guard, Sass, and Bootstrap for Ruby on Rails Development

posted in articles


I've always felt that getting up and running with a new web development project should be as easy as possible. A good example of this is a Rails app. As Ruby on Rails accomplishes a high degree of ease of use straight out of the box, this article will focus on setting up an automated testing environment and sprucing up your CSS with bootstrap-sass.

Grunt.js or How I learned to Stop Worrying and Automate Everything.

posted in articles


There are a number of tools from the web development community that are designed to make your life a whole lot easier. One such type of tool are automation tools or task runners. The three biggest players I have come across are Guard, Gulp, and Grunt.js. We will be diving into Grunt.js for the remainder of this article.

  • 1
  • 2
  • 3
  • 4
  • 5