godmin 0.9.3 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +15 -0
- data/lib/godmin/application.rb +2 -0
- data/lib/godmin/helpers/forms.rb +13 -0
- data/lib/godmin/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf754a62e429cbf72f011792ddbd02b7c4d3037d
|
4
|
+
data.tar.gz: 8a19bfc45fac23a39656db9134fbcccca9996195
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1564e32053544f65e81a89ecf4738d319649e6cadc8782be6bf03d1a69b20ee5d46cb4cddc628ea65dc62045de0cdd852cc5bb57991f1c85947f532f84b0252c
|
7
|
+
data.tar.gz: 0e65e90a7a924e2e399d07324857a9f080b9abe347bcf0a1ad60e2ff31c0e1079f771e57fc903734400d25c38b246dc5b4f49d883b51e8e60da6f3efc8452796
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -17,6 +17,7 @@ Godmin is an admin engine for Rails 4+.
|
|
17
17
|
- [Batch actions](#batch-actions)
|
18
18
|
- [Resource fetching](#resource-fetching)
|
19
19
|
- [Redirecting](#redirecting)
|
20
|
+
- [Pagination](#pagination)
|
20
21
|
- [Views](#views)
|
21
22
|
- [Models](#models)
|
22
23
|
- [Authentication](#authentication)
|
@@ -350,6 +351,20 @@ class ResourceController < ApplicationController
|
|
350
351
|
end
|
351
352
|
```
|
352
353
|
|
354
|
+
### Pagination
|
355
|
+
|
356
|
+
If you wish to change the number of resources per page, you can override the `per_page` class method in the controller:
|
357
|
+
|
358
|
+
```ruby
|
359
|
+
class ArticlesController
|
360
|
+
include Godmin::Resource
|
361
|
+
|
362
|
+
def self.per_page
|
363
|
+
50
|
364
|
+
end
|
365
|
+
end
|
366
|
+
```
|
367
|
+
|
353
368
|
## Views
|
354
369
|
|
355
370
|
It is easy to override view templates and partials in Godmin, both globally and per resource. All you have to do is place a file with an identical name in your `app/views` directory. For instance, to override the `godmin/resource/index.html.erb` template for all resources, place a file under `app/views/resource/index.html.erb`. If you only wish to override it for articles, place it instead under `app/views/articles/index.html.erb`.
|
data/lib/godmin/application.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require "godmin/helpers/application"
|
2
|
+
require "godmin/helpers/forms"
|
2
3
|
require "godmin/helpers/translations"
|
3
4
|
|
4
5
|
module Godmin
|
@@ -9,6 +10,7 @@ module Godmin
|
|
9
10
|
include Godmin::Helpers::Translations
|
10
11
|
|
11
12
|
helper Godmin::Helpers::Application
|
13
|
+
helper Godmin::Helpers::Forms
|
12
14
|
helper Godmin::Helpers::Translations
|
13
15
|
|
14
16
|
helper_method :authentication_enabled?
|
data/lib/godmin/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: godmin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jens Ljungblad
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-12-
|
13
|
+
date: 2014-12-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bcrypt
|
@@ -206,6 +206,7 @@ files:
|
|
206
206
|
- lib/godmin/helpers/application.rb
|
207
207
|
- lib/godmin/helpers/batch_actions.rb
|
208
208
|
- lib/godmin/helpers/filters.rb
|
209
|
+
- lib/godmin/helpers/forms.rb
|
209
210
|
- lib/godmin/helpers/tables.rb
|
210
211
|
- lib/godmin/helpers/translations.rb
|
211
212
|
- lib/godmin/rails.rb
|