Guest User

Untitled

a guest
Apr 11th, 2018
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. class User < ActiveRecord::Base
  2. # username, password
  3. end
  4.  
  5. class Admin < User
  6. # an_attribute
  7. end
  8.  
  9. Admin.create(:an_attribute => "hello", :username => "haxoor", :password => "1234")
  10.  
  11. admin = Admin.find_by_an_attribute("hello")
  12. admin.username # ??
Add Comment
Please, Sign In to add comment