Skip to content

Instantly share code, notes, and snippets.

@stbenjam
Created January 23, 2014 08:41
Show Gist options
  • Save stbenjam/8575084 to your computer and use it in GitHub Desktop.
Save stbenjam/8575084 to your computer and use it in GitHub Desktop.
[stbenjam@foreman-dev foreman]$ rails c test
For some operations a user must be set, try User.current = User.first
Loading test environment (Rails 3.2.16)
1.9.3-p448 :001 > host = Host.new :name => "myfullhost", :managed => true
[...]
1.9.3-p448 :003 > host.valid?
=> false
1.9.3-p448 :004 > host.errors[:root_pass].any?
=> true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment