- Matt Brictson on Lightning-Fast Sass Reloading in Rails 3.2. How to get CodeKit like reloads with your rails project. This little task is amazing, and will greatly speed stylistic chages.
- Bryan Helmkamp on 7 …
- Ruby on Rails Tutorial: Learn Web Development with Rails
- Eloquent Ruby [Review]({% post_url 2013-08-27-book-review:-eloquent-ruby %})
- Metaprogramming Ruby
- The RSpec Book [Review]({% post_url 2013-09-14-book-review:-the-rspec-book %})
- Practical Object-Oriented Design in Ruby
- Objects on Rails
- David …
Rails 4, Turbolinks, and jQuery November 10th 2013
If you have a Rails 4 project with malfunctioning jQuery the culprit is likely a new feature in Rails 4 called turbolinks. Turbolinks attempts to speed response times by not reloading the header (in fact the whole page) each time a new request is made. Instead, the body of the page is replaced using ajax and json. The …
Rails 4 and Twitter Bootstrap 3 October 30th 2013
If you are starting from scratch on a new rails project you may want to start with what is current, which at the moment is Rails 4 and Bootstrap 3. I would suggest setting up RVM or rbenv before continuing.
Install Rails 4:
gem install rails
Ensure you have it:
$ rails -v
Rails 4.0.0
Create your new project with rails: …
Strong Parameters in Rails 3 October 6th 2013
For the uninitiated, Strong Parameters is a gem for white-listing attributes that can be mass assigned. This is a replacement for the Rails method of white-listing that ships in 3.x. It also ships standard in Rails 4, so it behooves you to be familiar with it. Herein, I will discuss a few lessons in switch an existing …
Useful Rails blog posts August 14th 2013
A list of specific blog posts (not written by me) that I believe are helpful for a Rails developer:
Development
Ruby and Rails Book List July 16th 2013
Read
Rails notes June 8th 2013
Create a controller without tests.
rails generate controller {controller name} {views/methods} --no-test-framework
Create integration test
rails generate integration_test {test_name}
Roll back a migration
rake db:rollback
Rspec test for Mass Assign Vulnerbility (or attribute not being accessible):
describe …
Rails app start guide June 7th 2013
Set up a rails app with heroku, zerigo DNS, and bitbucket in one pomodoro:
rails new {app_name} --skip-test-unit
cd {app_name}
git init
git add .
git commit -m "generated skeleton"
vim Gemfile
Gemfile changes
< gem 'sqlite3'
---
> group :development do
9a10,11
> gem 'sqlite3'
> end …
Useful Rail Gems March 24th 2013
Below are a list of Gems have found to be useful as I was learning rails:
Testing
gem 'factory_girl_rails'
FactoryGirl automates the process of model creation for the purpose of testing.
gem 'launchy'
Launch allows you to open a webpage in testing, good for debugging tests
gem 'annotate' …
Installing Rails February 6th 2013
Ruby rails install
sudo apt-get install ruby rubygems
Install rails:
gem install rails
Long wait and then this result:
Fetching: i18n-0.6.1.gem (100%)
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /var/lib/gems
Installing RVM per Stackoverflow answer .:
curl -L https://get.rvm.io | bash …