rails_admin_cms 0.0.3 → 0.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aca625467f4115ced159d95b214b2f6122102f59
4
- data.tar.gz: 5a7620fc1c7846cfdc0c7a4aaf7b7b8b9fdd89b1
3
+ metadata.gz: 47d6104a8249cfb64b0579732b7abdf5e9600c57
4
+ data.tar.gz: 12c545d7bdaa8a096d50e28c31a3a928ca274f8a
5
5
  SHA512:
6
- metadata.gz: 3d1d94efde4c1c8a0ccb665a8a71cf878d11b2d7316b59516cc6fdbfd81a36be89de1da854bbce6f1dbf6da03540c42a598e32d4e889dc11f1e3f55e181de788
7
- data.tar.gz: 0fe2ddbd1f4c55f816af3f2b528712e721801448ceedaa0eb6f9d5424deaee49274f4e31aad608035ac4e64c083a7187d83fd8aa64ff8164d11eafb8bd94acd7
6
+ metadata.gz: c790c31c68a1cff583a72f57f983a0c1666532ab6d6ab6f7788f7e75e7c51aeab057f19eac6436b33d4f0aca6024ca97b68f6820c90eddc4abb077249729d2c9
7
+ data.tar.gz: ad2cf322ad079e6fd0c6c8769aad3e268d5b9b1bed108ff91c5b7169da1464d785cda76a2adadb7bfe1c069b730176c4521cc749e83f8585297be1ae7c30aa9e
data/README.md CHANGED
@@ -23,6 +23,8 @@ Seamlessly adds some useful classes to the body tag within your layout in order
23
23
 
24
24
  * Documentation
25
25
  * Generators
26
+ * Setup PaperTrail
27
+ * Setup Globalize on Form::Field and Form::Email
26
28
  * Published Pages/Forms
27
29
  * Mailchimp integration
28
30
  * More Specs
@@ -1,6 +1,16 @@
1
1
  module Naming
2
2
  module Form
3
3
  class << self
4
+ def models
5
+ @_models ||= Naming::Form.structure_models + Naming::Form.static_models + %w[
6
+ Form::Row
7
+ ]
8
+ end
9
+
10
+ def static_models
11
+ @_static_models ||= Naming::Viewable::Form.static_names.map{ |name| "Form::#{name.camelize}" }
12
+ end
13
+
4
14
  def structure_models
5
15
  %w[
6
16
  Form::Structure
@@ -12,7 +12,7 @@ module Viewable
12
12
 
13
13
  class_methods do
14
14
  def names
15
- raise NotImplementedError
15
+ "Naming::#{name}".constantize.names
16
16
  end
17
17
 
18
18
  def urls
@@ -1,7 +1,7 @@
1
1
  class CreateViewableBlock < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :viewable_blocks do |t|
4
- t.string :uuid
4
+ t.string :uuid, index: true
5
5
 
6
6
  t.timestamps null: false
7
7
  end
@@ -1,7 +1,7 @@
1
1
  class CreateViewablePage < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :viewable_pages do |t|
4
- t.string :uuid
4
+ t.string :uuid, index: true
5
5
  t.text :url, index: true
6
6
  t.string :title
7
7
  t.text :meta_keywords
@@ -3,7 +3,7 @@ class CreateViewableForm < ActiveRecord::Migration
3
3
  create_table :viewable_forms do |t|
4
4
  t.references :structure, index: true
5
5
 
6
- t.string :uuid
6
+ t.string :uuid, index: true
7
7
  t.text :url, index: true
8
8
  t.string :title
9
9
  t.text :meta_keywords
@@ -14,7 +14,7 @@
14
14
  <%= cms_locale_selector %>
15
15
  </div>
16
16
  <div>
17
- <%= cms_link_to_edit_mode %>
17
+ <%= cms_link_to_edit_mode if current_admin? %>
18
18
  </div>
19
19
 
20
20
  <%= yield %>
@@ -19,15 +19,20 @@ RailsAdmin.config do |config|
19
19
 
20
20
  ### More at https://github.com/sferik/rails_admin/wiki/Base-configuration
21
21
 
22
+ config.included_models = Naming::Viewable.models + Naming::Form.models + %w[
23
+ UniqueKey
24
+ Setting
25
+ Rich::RichFile
26
+ ]
27
+
22
28
  config.actions do
23
29
  dashboard # mandatory
24
30
  index # mandatory
25
31
  new do
26
- except Naming::Viewable.models + Naming::Form.structure_models + %w[
32
+ except Naming::Viewable.models + Naming::Form.models + %w[
27
33
  UniqueKey
28
34
  Setting
29
35
  Rich::RichFile
30
- Form::Row
31
36
  ]
32
37
  end
33
38
  export do
@@ -1,3 +1,3 @@
1
1
  module RailsAdminCMS
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_admin_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrice Lebel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-10 00:00:00.000000000 Z
11
+ date: 2016-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails