Guest User

Untitled

a guest
Feb 21st, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. def type=(value)
  2. self.id = 1 + (Client.find(:first, :conditions => ["id LIKE ?", "#{value}%"], :order=>'-id').id || value * 1000)
  3. end
Add Comment
Please, Sign In to add comment