Profile cover photo
Profile photo
Dillon Welch
Dillon's posts

Post has attachment
How to Link a Git Folder with an Existing Heroku App
Follow  this guide  to get Heroku setup on your command line tool of choice. heroku git:remote -a project_name where project name is the name of your Heroku app (if your app's URL is , project_name would be stellablog) and you're do...

Post has attachment
How to Push a Local Branch to a Separate Remote Branch
This is my first post about Git! I'll be talking about how to push the contents of a local branch to a remote branch that is different from what it currently points to. The base syntax is git push remote local_branch:remote_branch An example of when to use ...

Post has attachment
How to use respond_to? with private methods
respond_to? is an awesome method for testing if an object has a given method. By default, it will return false for methods that are private. If you want to test if an object has a method regardless of its private status, you can just pass true after the met...

Post has attachment
How to Load Dependencies in a Rails Engine
In a Rails project, generally all you have to do is add a gem to your Gemfile and the dependencies will automagically get taken care of. Unfortunately, for Rails Engines this is not the case. You will have to take the additional step of requiring the gem's ...

Post has attachment
How to specify a local gem in your Gemfile
If you're developing a gem and you want to test it out locally in another project, this is easily accomplished by specifying the path to the local gem in your Gemfile: gem 'bears', path: '/path/to/bears/gem' and boom, it's there. One bundle install later an...

Post has attachment
Removing extra whitespace from Haml
Most of the time, Haml is pretty awesome. One of the cases where it's not so awesome is around multiline mixed Ruby/HTML. For example, when trying to create a timer on the screen: Because of reasons, Haml decides to add extra whitespace around each of the s...

Post has attachment
Timed out waiting for response to {"name":"visit","args":[" "]}.
It's possible that this happened because something
took a very long time (for example a page load was slow).
If so, setting the Poltergeist :timeout
option to a high...

Post has attachment
Using local assets with save_and_open_page
Previously I talked about how to use save_and_open_page with Cucumber. Unfortunately, when you do this it renders an unstyled page. If you add Capybara.asset_host = 'http://localhost:3000' to your spec_helper.rb or Capybara config file, save_and_open_page w...

Post has attachment
undefined method `capture_haml' for RSpec
If you're using Haml in a Rails project, testing with RSpec, you might encounter the "undefined method 'capture_haml' for ..." error while trying to run your specs. I encountered this error in a view spec when trying to use Simple Form along with Haml. Fort...

Post has attachment
The correct Capybara syntax to test an input field with multiple attributes.
Wait while more posts are being loaded