7 ms·
I stayed close to what the author did. adding an index: add_index :tags, :name adding a null constraint: change_column :tags, :name, :string, null:
by localhostdotdev 7y ago
I stayed close to what the author did.
adding an index:
add_index :tags, :name
adding a null constraint:
change_column :tags, :name, :string, null: false
validates :name, presence: true # for proper validations
https://github.com/localhostdotdev/bug/commit/3765237008c36c539b30cbc8ad4127c14b0e546b https://github.com/localhostdotdev/bug/commit/3765237008c36c...
- davidcuddeback 7y ago> I stayed close to what the author did. Fair enough. I’ll concede that wasn’t a fair comparison to the OP. My point remains that examples focusing on the initial setup are uninteresting (to me) because that’s not where the bulk of the work is.