I use 3 w rails. How can I add validation to create an extra column in my user table, column: first_name
Any ideas?
thank
class User < ActiveRecord::Base validates :first_name, :presence => true end
An old question, but at the top of the Google search. A new answer is required.
I ran into this problem until I entered my new column / attribute in the attr_accessible chain. Then any checks that I wrote were performed properly.
Source: https://habr.com/ru/post/1787079/More articles:Два изображения, содержащие фон для div? - cssWhat are the different versions of Selenium, and which one should I get? - seleniumЛокализованные проверки подлинности JSF - jsfAddress already in use: I misunderstand UDP - udpUnderstanding the PhaseListener.getPhaseId Function - jsfPython - delete all words containing other words in a list - pythonDefault output when h: message is empty - faceletsWhich one is the first, Grails or Groovy? - grailsDropdowns are dragged into other containers, but not themselves? - jqueryJFile Chooser throws errors before use, only sometimes? - javaAll Articles