Tag Archives: RoR

Bootstrap – Responsive Mobile

I was having trouble with bootstrap adapting to mobile as it was still rendering a full page on my iPhone.  If you have the same issue with your smartphone not showing the responsive layout ensure you have the code below in your header. <meta name=”viewport” content=”width=device-width, initial-scale=1, maximum-scale=1″ />

Testing Setup in Rails

Took me a little while to get my head around testing but thanks to the rails tutorial it’s starting to sink in.  Here’s how to make testing g a lot easier thanks to guard and mini-test reporters.  For the full guide head over to here, this is just so I remember it!

Heroku: Application Error

Just in case anyone else is receiving an ‘Application Error: An Error occurred in the application and your page could not be served’ error after pushing your rails project my fix was pretty simple. In the console I ran: $ heroku run rake db:migrate This gave me an error saying that because Heroku didn’t support SQLite3… Read More »

Routes in Rails

A couple of posts back I created my nav menu by linking to other pages in my site using the link_to method.  I then moved the whole chunk of code into a partial and used the render method to show it in the main view. I now want my url structure to look a little neater,… Read More »

Adding a partial in Rails

Sometimes you just need to repeat the same code across the site and whilst it’s great to have it in the application.html.erb file it can make it look a little messy… that’s where partials come in. A partial is basically a part of your code you want to reuse and here’s how to do it.… Read More »