Call Montréal, Canada 524-949-6869

Blog

Monday, October 7, 2013

Rails: undefined method `action' for YourController:Class

You will receive this error if you have created your controller class manually (i.e. without the Rails generators) and have not inherited from ApplicationController. For example


This is easily fixed by adding ApplicationController as the parent. Note the change on line #1.

Developing Ruby on Rails applications and custom Content Management Systems in Montréal. Contact Firsthand.