0

I tried to generate a rails model like so:

rails generate model signal

Which produced this error:

The name 'Signal' is either already used in your application or reserved by Ruby on Rails. Please choose an alternative and run this generator again.

I quickly discovered that "Signal" was a reserved name for models:

Reserved names with ActiveRecord models

Is there any way around this so I can have a model named "Signal", like wrapping the model in a custom Module?

Community
  • 1
  • 1
Jon
  • 1,820
  • 2
  • 19
  • 43
  • Signal is part of the Ruby Standard Library: http://www.ruby-doc.org/core-2.1.0/Signal.html. Just name your class something like MySignal. – DiegoSalazar Jan 30 '14 at 17:36
  • 2
    Check this answer: http://stackoverflow.com/questions/11821146/models-with-reserved-keywords – jinavar1 Jan 30 '14 at 17:42

0 Answers0