rails_admin_slug 0.1.1 → 0.1.2
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.
- data/README.md +3 -2
- data/rails_admin_slug.gemspec +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -14,7 +14,7 @@ Simply add the gem to your projects Gemfile after the rails_admin line.
|
|
14
14
|
|
15
15
|
gem "rails_admin_slug"
|
16
16
|
|
17
|
-
Create
|
17
|
+
Create an app/assets/javascripts/rails_admin/custom/ui.js file and add the following line to the top (or just add if the file already exists):
|
18
18
|
|
19
19
|
//=require 'ra.slug'
|
20
20
|
|
@@ -22,6 +22,7 @@ Create a rails_admin/custom/ui.js file and add the following line to the top (or
|
|
22
22
|
|
23
23
|
In your RailsAdmin configuration file (usually config/initializers/rails_admin.rb) override the field type for the slug field.
|
24
24
|
The "source" configuration option defines which field the slug will be tied to and is required to be set.
|
25
|
+
(On the field line, the first :slug is your slug field, the second in the field type, overriding string in this case.)
|
25
26
|
|
26
27
|
RailsAdmin.config do |config|
|
27
28
|
config.model 'Page' do
|
@@ -48,5 +49,5 @@ The slug field type extends the string field type. This means it is still possib
|
|
48
49
|
|
49
50
|
## Credits
|
50
51
|
|
51
|
-
The jquery plugin that creates and edit the client side slug is from Patrick McElhaney and can be found at: https://github.com/pmcelhaney/jQuery-Slugify-Plugin
|
52
|
+
The jquery plugin that creates and edit the client side slug is from Patrick McElhaney and can be found at: https://github.com/pmcelhaney/jQuery-Slugify-Plugin
|
52
53
|
|
data/rails_admin_slug.gemspec
CHANGED