adminable 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +94 -33
  3. data/app/assets/javascripts/adminable/scripts.js +8 -5
  4. data/app/assets/stylesheets/adminable/application.scss +15 -0
  5. data/app/controllers/adminable/application_controller.rb +0 -3
  6. data/app/controllers/adminable/resources_controller.rb +49 -24
  7. data/app/models/concerns/adminable/resource_concern.rb +15 -0
  8. data/app/views/adminable/resources/_form.html.haml +5 -9
  9. data/app/views/adminable/resources/_search.html.haml +2 -2
  10. data/app/views/adminable/resources/edit.html.haml +1 -1
  11. data/app/views/adminable/resources/form/_belongs_to.html.haml +13 -3
  12. data/app/views/adminable/resources/form/_boolean.html.haml +5 -2
  13. data/app/views/adminable/resources/form/_date.html.haml +3 -0
  14. data/app/views/adminable/resources/form/_datetime.html.haml +3 -2
  15. data/app/views/adminable/resources/form/_decimal.html.haml +3 -2
  16. data/app/views/adminable/resources/form/_float.html.haml +3 -2
  17. data/app/views/adminable/resources/form/_has_many.html.haml +12 -8
  18. data/app/views/adminable/resources/form/_integer.html.haml +3 -2
  19. data/app/views/adminable/resources/form/_string.html.haml +3 -2
  20. data/app/views/adminable/resources/form/_text.html.haml +4 -2
  21. data/app/views/adminable/resources/form/_time.html.haml +3 -0
  22. data/app/views/adminable/resources/form/_timestamp.html.haml +3 -0
  23. data/app/views/adminable/resources/index.html.haml +12 -14
  24. data/app/views/adminable/resources/index/_belongs_to.html.haml +4 -5
  25. data/app/views/adminable/resources/index/_date.html.haml +2 -0
  26. data/app/views/adminable/resources/index/_has_many.html.haml +1 -2
  27. data/app/views/adminable/resources/index/_text.html.haml +1 -1
  28. data/app/views/adminable/resources/index/_time.html.haml +2 -0
  29. data/app/views/adminable/resources/index/_timestamp.html.haml +2 -0
  30. data/app/views/adminable/shared/_label.html.haml +6 -3
  31. data/app/views/layouts/adminable/application.html.haml +3 -4
  32. data/config/locales/adminable.en.yml +4 -1
  33. data/config/locales/adminable.ru.yml +21 -0
  34. data/config/routes.rb +1 -1
  35. data/lib/adminable.rb +9 -4
  36. data/lib/adminable/attributes/association.rb +7 -14
  37. data/lib/adminable/attributes/base.rb +36 -18
  38. data/lib/adminable/attributes/collection.rb +75 -36
  39. data/lib/adminable/attributes/types/belongs_to.rb +1 -3
  40. data/lib/adminable/attributes/types/date.rb +8 -0
  41. data/lib/adminable/attributes/types/has_many.rb +0 -6
  42. data/lib/adminable/attributes/types/time.rb +8 -0
  43. data/lib/adminable/attributes/types/timestamp.rb +8 -0
  44. data/lib/adminable/configuration.rb +7 -2
  45. data/lib/adminable/engine.rb +5 -1
  46. data/lib/adminable/errors.rb +7 -0
  47. data/lib/adminable/presenters/base_presenter.rb +11 -0
  48. data/lib/adminable/presenters/entries_presenter.rb +55 -0
  49. data/lib/adminable/presenters/entry_presenter.rb +68 -0
  50. data/lib/adminable/resource.rb +9 -15
  51. data/lib/adminable/version.rb +1 -1
  52. data/lib/generators/adminable/install/templates/application_controller.rb +2 -0
  53. data/lib/generators/adminable/install_generator.rb +27 -0
  54. data/lib/generators/{cms → adminable}/resource/templates/resource_controller.rb.erb +0 -0
  55. data/lib/generators/{cms → adminable}/resource_generator.rb +0 -0
  56. metadata +77 -33
  57. data/lib/adminable/extensions/devise.rb +0 -24
@@ -1,24 +0,0 @@
1
- module Adminable
2
- module Extensions
3
- module Devise
4
- def index
5
- super.except!(:encrypted_password)
6
-
7
- @index ||= super
8
- end
9
-
10
- def form
11
- super.except!(:encrypted_password)
12
- super[:password] = Adminable::Attributes::Types::String.new(:password)
13
-
14
- @form ||= super
15
- end
16
-
17
- def ransack
18
- super.except!(:encrypted_password)
19
-
20
- @ransack ||= super
21
- end
22
- end
23
- end
24
- end