Blog
Tagged with: rails
System Tests with RSpec, Rails, Capybara, and Devise
Since the release of RSpec 3.7 weâve been able to take advantage of system tests which are new as of Rails 5.1. If youâve been using RSpec for a while youâre already likely familiar with feature tests using Capybara. For those new to these types of tests: they allow us to test the actual actions of a user. Clicki...
ActionMailer SMTP settings for SendGrid (Rails)
Okay, I got no Google hits for this. Hereâs a tip if youâre using SendGrid in a Rails app for your transactional emails. A while back you needed to provide your SendGrid username and password (hopefully via environment variables), but now you can use an app-specific api key.
Hereâs some historical context. This ...
Heroku defaults to Puma for Rails 5
Itâs now going to be easier than ever to kick off a new Rails project and deploy to Heroku. WEBrick is no longer the default server with Rails 5. If you donât provide a Procfile
Heroku is going to help you out and set you up with Puma. Production ready out of the box. So⦠thatâs cool.
Also of note, configurati...
How to Create a Contact Form Using Rails and Mandrill
Letâs build a simple contact form for your Rails driven website that uses Mandrill as the desired email server. Mandrill lets us offload the management of setting up and running an email server ourselves and, therefore, relieving ourselves of a massive headache. Mandrill starts you with 2,000 free trial sends which i...
Syntax Highlighting in Rails
Your Rails driven website has the need to display some code. Itâs not good enough to just get proper indentation, youâd like to have some decent syntax highlighting. Maybe something like following.
Thereâs a great ruby gem called Rouge that makes this process quite easy for us. What is Rouge?
Pretty cool, letâ...
Editing a form using fields_for in Rails
Letâs say youâd like to successfully create or update a nested form using fields_for
. Our âparentâ will be a Post model and our âchildâ will be a Tag model. Itâs not hard, but thereâs a bit of a gotcha that I found most other resources out there were leaving out.
Weâll use a Post model as our parent ...
Blog Categories
About These Posts

My blog primarily contains writings about my work on computers, but I occasionally mix in fun life stuff. I am, at best, a mediocre writer, but I like doing my part to give back to the community. Feel free to contact me if you have specific something to chat about. See you around!