employ.rb 550 B

123456789101112131415161718192021222324252627282930
  1. # encoding: utf-8
  2. class Employ < ActiveRecord::Base
  3. self.table_name = "employ"
  4. validates :mobile,:user_name,presence: true
  5. rails_admin do
  6. navigation_label '食堂管理'
  7. weight -500
  8. list do
  9. filters [:mobile]
  10. field :id
  11. field :user_name
  12. field :mobile
  13. field :created_at
  14. # field :updated_at
  15. end
  16. show do
  17. field :id
  18. field :user_name
  19. field :mobile
  20. field :created_at
  21. field :updated_at
  22. end
  23. edit do
  24. field :user_name
  25. field :mobile
  26. end
  27. end
  28. end