Using question mark character in Rails/ActiveRecord column name
In keeping with Ruby's idiom of using a question mark in boolean methods (e.g.
), I'd like to do the same for an ActiveRecord field in Rails:
rails generate model Person is_smart?:boolean
I haven't actually run the above statement. I assume that database fields can't have a question mark in them. Will rails deal with this appropriately? Is the best practice to simply leave question marks off of models?