adminable 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +94 -33
- data/app/assets/javascripts/adminable/scripts.js +8 -5
- data/app/assets/stylesheets/adminable/application.scss +15 -0
- data/app/controllers/adminable/application_controller.rb +0 -3
- data/app/controllers/adminable/resources_controller.rb +49 -24
- data/app/models/concerns/adminable/resource_concern.rb +15 -0
- data/app/views/adminable/resources/_form.html.haml +5 -9
- data/app/views/adminable/resources/_search.html.haml +2 -2
- data/app/views/adminable/resources/edit.html.haml +1 -1
- data/app/views/adminable/resources/form/_belongs_to.html.haml +13 -3
- data/app/views/adminable/resources/form/_boolean.html.haml +5 -2
- data/app/views/adminable/resources/form/_date.html.haml +3 -0
- data/app/views/adminable/resources/form/_datetime.html.haml +3 -2
- data/app/views/adminable/resources/form/_decimal.html.haml +3 -2
- data/app/views/adminable/resources/form/_float.html.haml +3 -2
- data/app/views/adminable/resources/form/_has_many.html.haml +12 -8
- data/app/views/adminable/resources/form/_integer.html.haml +3 -2
- data/app/views/adminable/resources/form/_string.html.haml +3 -2
- data/app/views/adminable/resources/form/_text.html.haml +4 -2
- data/app/views/adminable/resources/form/_time.html.haml +3 -0
- data/app/views/adminable/resources/form/_timestamp.html.haml +3 -0
- data/app/views/adminable/resources/index.html.haml +12 -14
- data/app/views/adminable/resources/index/_belongs_to.html.haml +4 -5
- data/app/views/adminable/resources/index/_date.html.haml +2 -0
- data/app/views/adminable/resources/index/_has_many.html.haml +1 -2
- data/app/views/adminable/resources/index/_text.html.haml +1 -1
- data/app/views/adminable/resources/index/_time.html.haml +2 -0
- data/app/views/adminable/resources/index/_timestamp.html.haml +2 -0
- data/app/views/adminable/shared/_label.html.haml +6 -3
- data/app/views/layouts/adminable/application.html.haml +3 -4
- data/config/locales/adminable.en.yml +4 -1
- data/config/locales/adminable.ru.yml +21 -0
- data/config/routes.rb +1 -1
- data/lib/adminable.rb +9 -4
- data/lib/adminable/attributes/association.rb +7 -14
- data/lib/adminable/attributes/base.rb +36 -18
- data/lib/adminable/attributes/collection.rb +75 -36
- data/lib/adminable/attributes/types/belongs_to.rb +1 -3
- data/lib/adminable/attributes/types/date.rb +8 -0
- data/lib/adminable/attributes/types/has_many.rb +0 -6
- data/lib/adminable/attributes/types/time.rb +8 -0
- data/lib/adminable/attributes/types/timestamp.rb +8 -0
- data/lib/adminable/configuration.rb +7 -2
- data/lib/adminable/engine.rb +5 -1
- data/lib/adminable/errors.rb +7 -0
- data/lib/adminable/presenters/base_presenter.rb +11 -0
- data/lib/adminable/presenters/entries_presenter.rb +55 -0
- data/lib/adminable/presenters/entry_presenter.rb +68 -0
- data/lib/adminable/resource.rb +9 -15
- data/lib/adminable/version.rb +1 -1
- data/lib/generators/adminable/install/templates/application_controller.rb +2 -0
- data/lib/generators/adminable/install_generator.rb +27 -0
- data/lib/generators/{cms → adminable}/resource/templates/resource_controller.rb.erb +0 -0
- data/lib/generators/{cms → adminable}/resource_generator.rb +0 -0
- metadata +77 -33
- 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
|