activeadmin_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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NDM5MzNiZTExZjA4MjA1ZWMzNGVlZjlmMTlhY2VmMDA0ZjQwNjgzNA==
4
+ NTZiMDg1M2U0NWNhODljNTdkYjhhMjdjOTk0ODc1ODY5NWZmNjdiZQ==
5
5
  data.tar.gz: !binary |-
6
- MGU2YTVlMDljZTM2MWVlN2YxMTk3YmJjODVkNTcxZjk4MGVlZWEyMQ==
6
+ ZDNmOTBjMjc1ZDZlMWU2ZmEzMDFiZmJlMzFjNWM2Zjk0ODNkNTk1Zg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- YTQyYzI5ODM5NzYxNGU0NTEyMGQ5NGZhNTk5MjBhYjk4MzcyMmIxYzNmZjQw
10
- YTgyMTY3ZTAyY2ZkMzNkMDE0YjZiMjE4MjY3NDkyMmRhM2Q3YzVkZDc1YjUx
11
- ZGQzMDQyY2UxODMyZDY3ODk0ODNkNzEyMzBmZDQ4NTkxNmNlMTE=
9
+ ZDMyYTQ0MjQ2OWUxNjdmZjBjN2U5MjAzMGY5NjUwYTVlMWY2MjVlMGI0OTI3
10
+ MTM3YzFmNzg2MWYyMWE2ZWU4YzAxMjVjZDU2MjhkMmQ5MjRmNDM4MWM5NmNi
11
+ NTEzM2NlZjc4MzIwYWI4MDRkZDY1ZWY5MzBkYTA5OGNkMmY0YTU=
12
12
  data.tar.gz: !binary |-
13
- ZTI2MGYxZDNiN2MxNTYzMmU4OTgyNjRhNjgwNmM1ZTFmYTg4ZTY1YTZmZDQy
14
- MjExNGY2MjQwMGZkYjcxMTliNWJkN2EyOWY2MDUyYjczZWE3NzJjNzJlNmQ4
15
- OGRkMmNmM2ZmMjJkMWNmYTliOTVkZjFiODMzM2Y1N2Q2NDU4NzQ=
13
+ ZTc5ODA2ZDllZTc2ZGZkNmZhY2M3MWE2ZTY1YWNiZGQyYWY4ZDAzNzZmOWQw
14
+ MTQzYWNlOTE3ODAxMGUyZDI0OGFmZTFlMTZiZWM2MWQ5NzJmMTU5NTQ3Mjhh
15
+ NDIxZDIzMzk1ZTllNTE1MThmMzE2M2VlOGJiMzk0ZTIzMzk5ODc=
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ### Getting Started
1
+ # ActiveadminCms [ ![Build Status](https://secure.travis-ci.org/droidlabs/activeadmin_cms.png)](https://travis-ci.org/droidlabs/activeadmin_cms)
2
2
 
3
3
  ActiveAdminCms adds CMS functionality to your ActiveAdmin backend.
4
4
 
@@ -50,7 +50,7 @@ ActiveAdmin.register ActiveadminCms::Page, as: 'Page' do
50
50
 
51
51
  if @page.update_attributes(permitted_params)
52
52
  if params[:commit].downcase != 'save'
53
- @page.publish!
53
+ ActiveadminCms::PagesService.publish(@page)
54
54
  end
55
55
  redirect_to admin_page_path(@page)
56
56
  else
@@ -85,14 +85,13 @@ ActiveAdmin.register ActiveadminCms::Page, as: 'Page' do
85
85
 
86
86
  member_action :publish, method: :put do
87
87
  page = ActiveadminCms::Page.find(params[:id])
88
- page.publish!
88
+ ActiveadminCms::PagesService.publish(page)
89
89
  redirect_to admin_page_path(page), notice: "The page has been published!"
90
90
  end
91
91
 
92
92
  member_action :draft, method: :put do
93
93
  page = ActiveadminCms::Page.find(params[:id])
94
- page.published = false
95
- page.save
94
+ ActiveadminCms::PagesService.move_draft(page)
96
95
  redirect_to admin_page_path(page), notice: "The page has been moved to draft!"
97
96
  end
98
97
  end
@@ -48,14 +48,13 @@ ActiveAdmin.register ActiveadminCms::Post, as: 'Post' do
48
48
 
49
49
  member_action :publish, method: :put do
50
50
  post = ActiveadminCms::Post.find(params[:id])
51
- post.publish!
51
+ ActiveadminCms::PostsService.publish(post)
52
52
  redirect_to admin_post_path(post), notice: "The post has been published!"
53
53
  end
54
54
 
55
55
  member_action :draft, method: :put do
56
56
  post = ActiveadminCms::Post.find(params[:id])
57
- post.published = false
58
- post.save
57
+ ActiveadminCms::PostsService.move_draft(post)
59
58
  redirect_to admin_post_path(post), notice: "The post has been moved to draft!"
60
59
  end
61
60
  end
@@ -1,5 +1,8 @@
1
1
  module ActiveadminCms
2
2
  class Page < ActiveRecord::Base
3
+ validates :slug, presence: true, uniqueness: true
4
+ validates :title, presence: true
5
+
3
6
  def has_changed_content?
4
7
  content != draft_content
5
8
  end
@@ -1,5 +1,7 @@
1
1
  module ActiveadminCms
2
2
  class Post < ActiveRecord::Base
3
+ validates :title, presence: true
4
+
3
5
  if ActiveadminCms::Engine.config.tags_backend = 'acts_as_taggable_on'
4
6
  acts_as_taggable
5
7
  end
@@ -0,0 +1,24 @@
1
+ module ActiveadminCms
2
+ class PagesService
3
+ class << self
4
+ def publish(page)
5
+ page.content = page.draft_content
6
+ page.published = true
7
+ page.save
8
+ end
9
+
10
+ def move_draft(page)
11
+ page.published = false
12
+ page.save
13
+ end
14
+
15
+ def all_with_category(category)
16
+ ActiveadminCms::Page.where(category: category.to_s)
17
+ end
18
+
19
+ def find_by_slug(slug)
20
+ ActiveadminCms::Page.find_by_slug(slug)
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,15 @@
1
+ module ActiveadminCms
2
+ class PostsService
3
+ class << self
4
+ def publish(post)
5
+ post.published = true
6
+ post.save
7
+ end
8
+
9
+ def move_draft(post)
10
+ post.published = false
11
+ post.save
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,6 @@
1
+ class AddSlugToActiveadminCmsPages < ActiveRecord::Migration
2
+ def change
3
+ add_column :activeadmin_cms_pages, :slug, :string
4
+ add_index :activeadmin_cms_pages, :slug
5
+ end
6
+ end
@@ -1,3 +1,3 @@
1
1
  module ActiveadminCms
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20131020152912) do
14
+ ActiveRecord::Schema.define(version: 20131020181730) do
15
15
 
16
16
  create_table "activeadmin_cms_pages", force: true do |t|
17
17
  t.string "title"
@@ -21,9 +21,11 @@ ActiveRecord::Schema.define(version: 20131020152912) do
21
21
  t.boolean "published", default: false
22
22
  t.datetime "created_at"
23
23
  t.datetime "updated_at"
24
+ t.string "slug"
24
25
  end
25
26
 
26
27
  add_index "activeadmin_cms_pages", ["category"], name: "index_activeadmin_cms_pages_on_category"
28
+ add_index "activeadmin_cms_pages", ["slug"], name: "index_activeadmin_cms_pages_on_slug"
27
29
 
28
30
  create_table "activeadmin_cms_posts", force: true do |t|
29
31
  t.string "title"
Binary file
@@ -13,3 +13,23 @@ Migrating to CreateActiveadminCmsPages (20131020152912)
13
13
  SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131020152912"]]
14
14
   (1.0ms) commit transaction
15
15
  ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
16
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
17
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
18
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
19
+ Migrating to AddSlugToActiveadminCmsPages (20131020181730)
20
+  (0.1ms) begin transaction
21
+  (0.2ms) ALTER TABLE "pages" ADD "slug" varchar(255)
22
+ SQLite3::SQLException: no such table: pages: ALTER TABLE "pages" ADD "slug" varchar(255)
23
+  (0.1ms) rollback transaction
24
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
25
+ Migrating to AddSlugToActiveadminCmsPages (20131020181730)
26
+  (0.1ms) begin transaction
27
+  (0.5ms) ALTER TABLE "activeadmin_cms_pages" ADD "slug" varchar(255)
28
+  (0.1ms) CREATE INDEX "index_activeadmin_cms_pages_on_slug" ON "activeadmin_cms_pages" ("slug")
29
+  (0.4ms) rollback transaction
30
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
31
+ Migrating to AddSlugToActiveadminCmsPages (20131020181730)
32
+  (0.1ms) begin transaction
33
+ SQL (1.7ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131020181730"]]
34
+  (1.0ms) commit transaction
35
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
@@ -8,3 +8,688 @@ ActiveadminCmsTest: test_truth
8
8
   (0.0ms) SAVEPOINT active_record_1
9
9
   (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
10
10
   (0.1ms) rollback transaction
11
+  (0.1ms) begin transaction
12
+ -----------------------------------------------------
13
+ #publish: test_0001_should change status to published
14
+ -----------------------------------------------------
15
+  (0.0ms) SAVEPOINT active_record_1
16
+  (0.0ms) RELEASE SAVEPOINT active_record_1
17
+  (0.0ms) SAVEPOINT active_record_1
18
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
19
+  (0.1ms) rollback transaction
20
+  (0.0ms) begin transaction
21
+ ------------------------------
22
+ ActiveadminCmsTest: test_truth
23
+ ------------------------------
24
+  (0.0ms) SAVEPOINT active_record_1
25
+  (0.0ms) RELEASE SAVEPOINT active_record_1
26
+  (0.0ms) SAVEPOINT active_record_1
27
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
28
+  (0.0ms) rollback transaction
29
+  (0.1ms) begin transaction
30
+ -----------------------------------------------------
31
+ #publish: test_0001_should change status to published
32
+ -----------------------------------------------------
33
+  (0.1ms) SAVEPOINT active_record_1
34
+  (0.0ms) RELEASE SAVEPOINT active_record_1
35
+  (0.0ms) SAVEPOINT active_record_1
36
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
37
+  (0.1ms) rollback transaction
38
+  (0.1ms) begin transaction
39
+ ------------------------------
40
+ ActiveadminCmsTest: test_truth
41
+ ------------------------------
42
+  (0.0ms) SAVEPOINT active_record_1
43
+  (0.0ms) RELEASE SAVEPOINT active_record_1
44
+  (0.0ms) SAVEPOINT active_record_1
45
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
46
+  (0.0ms) rollback transaction
47
+  (1.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
48
+  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
49
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
50
+ Migrating to CreateActiveadminCmsPosts (20131020140024)
51
+  (0.0ms) begin transaction
52
+  (0.5ms) CREATE TABLE "activeadmin_cms_posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "content" text, "published" boolean DEFAULT 'f', "created_at" datetime, "updated_at" datetime) 
53
+ SQL (1.9ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131020140024"]]
54
+  (0.9ms) commit transaction
55
+ Migrating to CreateActiveadminCmsPages (20131020152912)
56
+  (0.1ms) begin transaction
57
+  (0.5ms) CREATE TABLE "activeadmin_cms_pages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "category" varchar(255), "content" text, "draft_content" text, "published" boolean DEFAULT 'f', "created_at" datetime, "updated_at" datetime) 
58
+  (0.1ms) CREATE INDEX "index_activeadmin_cms_pages_on_category" ON "activeadmin_cms_pages" ("category")
59
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131020152912"]]
60
+  (1.0ms) commit transaction
61
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
62
+  (1.1ms) DELETE FROM "activeadmin_cms_posts";
63
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
64
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_posts';
65
+  (1.0ms) DELETE FROM "activeadmin_cms_pages";
66
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
67
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_pages';
68
+  (0.1ms) begin transaction
69
+ -----------------------------------------------------
70
+ #publish: test_0001_should change status to published
71
+ -----------------------------------------------------
72
+  (0.0ms) SAVEPOINT active_record_1
73
+  (0.0ms) RELEASE SAVEPOINT active_record_1
74
+  (0.0ms) SAVEPOINT active_record_1
75
+ SQL (5.8ms) INSERT INTO "activeadmin_cms_pages" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "Foo content"], ["created_at", Sun, 20 Oct 2013 17:50:02 UTC +00:00], ["title", "Foo page"], ["updated_at", Sun, 20 Oct 2013 17:50:02 UTC +00:00]]
76
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
77
+  (0.5ms) rollback transaction
78
+  (0.1ms) begin transaction
79
+ ------------------------------
80
+ ActiveadminCmsTest: test_truth
81
+ ------------------------------
82
+  (0.0ms) SAVEPOINT active_record_1
83
+  (0.0ms) RELEASE SAVEPOINT active_record_1
84
+  (0.0ms) SAVEPOINT active_record_1
85
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
86
+  (0.0ms) rollback transaction
87
+  (1.3ms) DELETE FROM "activeadmin_cms_posts";
88
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
89
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_posts';
90
+  (0.9ms) DELETE FROM "activeadmin_cms_pages";
91
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
92
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_pages';
93
+  (0.1ms) begin transaction
94
+ -----------------------------------------------------
95
+ #publish: test_0001_should change status to published
96
+ -----------------------------------------------------
97
+  (0.0ms) SAVEPOINT active_record_1
98
+  (0.0ms) RELEASE SAVEPOINT active_record_1
99
+  (0.0ms) SAVEPOINT active_record_1
100
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
101
+  (0.1ms) rollback transaction
102
+  (0.0ms) begin transaction
103
+ ------------------------------
104
+ ActiveadminCmsTest: test_truth
105
+ ------------------------------
106
+  (0.1ms) SAVEPOINT active_record_1
107
+  (0.0ms) RELEASE SAVEPOINT active_record_1
108
+  (0.0ms) SAVEPOINT active_record_1
109
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
110
+  (0.0ms) rollback transaction
111
+  (1.3ms) DELETE FROM "activeadmin_cms_posts";
112
+  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
113
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_posts';
114
+  (5.7ms) DELETE FROM "activeadmin_cms_pages";
115
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
116
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_pages';
117
+  (0.1ms) begin transaction
118
+ -----------------------------------------------------
119
+ #publish: test_0001_should change status to published
120
+ -----------------------------------------------------
121
+  (0.1ms) SAVEPOINT active_record_1
122
+  (0.0ms) RELEASE SAVEPOINT active_record_1
123
+  (0.0ms) SAVEPOINT active_record_1
124
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
125
+  (0.1ms) rollback transaction
126
+  (0.1ms) begin transaction
127
+ ------------------------------
128
+ ActiveadminCmsTest: test_truth
129
+ ------------------------------
130
+  (0.0ms) SAVEPOINT active_record_1
131
+  (0.0ms) RELEASE SAVEPOINT active_record_1
132
+  (0.0ms) SAVEPOINT active_record_1
133
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
134
+  (0.0ms) rollback transaction
135
+  (1.2ms) DELETE FROM "activeadmin_cms_posts";
136
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
137
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_posts';
138
+  (0.9ms) DELETE FROM "activeadmin_cms_pages";
139
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
140
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_pages';
141
+  (0.1ms) begin transaction
142
+ -----------------------------------------------------
143
+ #publish: test_0001_should change status to published
144
+ -----------------------------------------------------
145
+  (0.0ms) SAVEPOINT active_record_1
146
+  (0.0ms) RELEASE SAVEPOINT active_record_1
147
+  (0.0ms) SAVEPOINT active_record_1
148
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
149
+  (0.1ms) rollback transaction
150
+  (0.0ms) begin transaction
151
+ ------------------------------
152
+ ActiveadminCmsTest: test_truth
153
+ ------------------------------
154
+  (0.0ms) SAVEPOINT active_record_1
155
+  (0.0ms) RELEASE SAVEPOINT active_record_1
156
+  (0.0ms) SAVEPOINT active_record_1
157
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
158
+  (0.0ms) rollback transaction
159
+  (1.3ms) DELETE FROM "activeadmin_cms_posts";
160
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
161
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_posts';
162
+  (2.0ms) DELETE FROM "activeadmin_cms_pages";
163
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
164
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_pages';
165
+  (0.1ms) begin transaction
166
+ -----------------------------------------------------
167
+ #publish: test_0001_should change status to published
168
+ -----------------------------------------------------
169
+  (0.1ms) SAVEPOINT active_record_1
170
+  (0.0ms) RELEASE SAVEPOINT active_record_1
171
+  (0.0ms) SAVEPOINT active_record_1
172
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
173
+  (0.1ms) rollback transaction
174
+  (0.0ms) begin transaction
175
+ ------------------------------
176
+ ActiveadminCmsTest: test_truth
177
+ ------------------------------
178
+  (0.0ms) SAVEPOINT active_record_1
179
+  (0.0ms) RELEASE SAVEPOINT active_record_1
180
+  (0.0ms) SAVEPOINT active_record_1
181
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
182
+  (0.1ms) rollback transaction
183
+  (1.6ms) DELETE FROM "activeadmin_cms_posts";
184
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
185
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_posts';
186
+  (1.1ms) DELETE FROM "activeadmin_cms_pages";
187
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
188
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_pages';
189
+  (0.1ms) begin transaction
190
+ -----------------------------------------------------
191
+ #publish: test_0001_should change status to published
192
+ -----------------------------------------------------
193
+  (0.1ms) SAVEPOINT active_record_1
194
+  (0.0ms) RELEASE SAVEPOINT active_record_1
195
+  (0.0ms) SAVEPOINT active_record_1
196
+ SQL (5.7ms) INSERT INTO "activeadmin_cms_pages" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "Foo content"], ["created_at", Sun, 20 Oct 2013 17:56:45 UTC +00:00], ["title", "Foo page"], ["updated_at", Sun, 20 Oct 2013 17:56:45 UTC +00:00]]
197
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
198
+  (0.5ms) rollback transaction
199
+  (0.1ms) begin transaction
200
+ ------------------------------
201
+ ActiveadminCmsTest: test_truth
202
+ ------------------------------
203
+  (0.0ms) SAVEPOINT active_record_1
204
+  (0.0ms) RELEASE SAVEPOINT active_record_1
205
+  (0.0ms) SAVEPOINT active_record_1
206
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
207
+  (0.0ms) rollback transaction
208
+  (1.3ms) DELETE FROM "activeadmin_cms_posts";
209
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
210
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_posts';
211
+  (1.0ms) DELETE FROM "activeadmin_cms_pages";
212
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
213
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_pages';
214
+  (0.1ms) begin transaction
215
+ -----------------------------------------------------
216
+ #publish: test_0001_should change status to published
217
+ -----------------------------------------------------
218
+  (0.1ms) SAVEPOINT active_record_1
219
+  (0.0ms) RELEASE SAVEPOINT active_record_1
220
+  (0.0ms) SAVEPOINT active_record_1
221
+ SQL (5.2ms) INSERT INTO "activeadmin_cms_pages" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "Foo content"], ["created_at", Sun, 20 Oct 2013 17:57:03 UTC +00:00], ["title", "Foo page"], ["updated_at", Sun, 20 Oct 2013 17:57:03 UTC +00:00]]
222
+ SQL (0.3ms) UPDATE "activeadmin_cms_pages" SET "content" = ?, "published" = ?, "updated_at" = ? WHERE "activeadmin_cms_pages"."id" = 1 [["content", nil], ["published", true], ["updated_at", Sun, 20 Oct 2013 17:57:03 UTC +00:00]]
223
+ ActiveadminCms::Page Load (0.3ms) SELECT "activeadmin_cms_pages".* FROM "activeadmin_cms_pages" WHERE "activeadmin_cms_pages"."id" = ? LIMIT 1 [["id", 1]]
224
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
225
+  (0.6ms) rollback transaction
226
+  (0.1ms) begin transaction
227
+ ------------------------------
228
+ ActiveadminCmsTest: test_truth
229
+ ------------------------------
230
+  (0.0ms) SAVEPOINT active_record_1
231
+  (0.1ms) RELEASE SAVEPOINT active_record_1
232
+  (0.1ms) SAVEPOINT active_record_1
233
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
234
+  (0.1ms) rollback transaction
235
+  (1.4ms) DELETE FROM "activeadmin_cms_posts";
236
+  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
237
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_posts';
238
+  (5.7ms) DELETE FROM "activeadmin_cms_pages";
239
+  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
240
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_pages';
241
+  (0.1ms) begin transaction
242
+ -----------------------------------------------------
243
+ #publish: test_0001_should change status to published
244
+ -----------------------------------------------------
245
+  (0.1ms) SAVEPOINT active_record_1
246
+  (0.0ms) RELEASE SAVEPOINT active_record_1
247
+  (0.0ms) SAVEPOINT active_record_1
248
+ SQL (6.1ms) INSERT INTO "activeadmin_cms_pages" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "Foo content"], ["created_at", Sun, 20 Oct 2013 17:57:24 UTC +00:00], ["title", "Foo page"], ["updated_at", Sun, 20 Oct 2013 17:57:24 UTC +00:00]]
249
+ SQL (0.2ms) UPDATE "activeadmin_cms_pages" SET "content" = ?, "published" = ?, "updated_at" = ? WHERE "activeadmin_cms_pages"."id" = 1 [["content", nil], ["published", true], ["updated_at", Sun, 20 Oct 2013 17:57:24 UTC +00:00]]
250
+ ActiveadminCms::Page Load (0.1ms) SELECT "activeadmin_cms_pages".* FROM "activeadmin_cms_pages" WHERE "activeadmin_cms_pages"."id" = ? LIMIT 1 [["id", 1]]
251
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
252
+  (0.5ms) rollback transaction
253
+  (0.1ms) begin transaction
254
+ ------------------------------
255
+ ActiveadminCmsTest: test_truth
256
+ ------------------------------
257
+  (0.1ms) SAVEPOINT active_record_1
258
+  (0.0ms) RELEASE SAVEPOINT active_record_1
259
+  (0.0ms) SAVEPOINT active_record_1
260
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
261
+  (0.0ms) rollback transaction
262
+  (1.5ms) DELETE FROM "activeadmin_cms_posts";
263
+  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
264
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_posts';
265
+  (2.0ms) DELETE FROM "activeadmin_cms_pages";
266
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
267
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_pages';
268
+  (0.1ms) begin transaction
269
+ -----------------------------------------------------
270
+ #publish: test_0001_should change status to published
271
+ -----------------------------------------------------
272
+  (0.0ms) SAVEPOINT active_record_1
273
+  (0.0ms) RELEASE SAVEPOINT active_record_1
274
+  (0.0ms) SAVEPOINT active_record_1
275
+ SQL (5.4ms) INSERT INTO "activeadmin_cms_pages" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "Foo content"], ["created_at", Sun, 20 Oct 2013 17:57:46 UTC +00:00], ["title", "Foo page"], ["updated_at", Sun, 20 Oct 2013 17:57:46 UTC +00:00]]
276
+ SQL (0.3ms) UPDATE "activeadmin_cms_pages" SET "content" = ?, "published" = ?, "updated_at" = ? WHERE "activeadmin_cms_pages"."id" = 1 [["content", nil], ["published", true], ["updated_at", Sun, 20 Oct 2013 17:57:46 UTC +00:00]]
277
+ ActiveadminCms::Page Load (0.2ms) SELECT "activeadmin_cms_pages".* FROM "activeadmin_cms_pages" WHERE "activeadmin_cms_pages"."id" = ? LIMIT 1 [["id", 1]]
278
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
279
+  (0.5ms) rollback transaction
280
+  (0.1ms) begin transaction
281
+ ------------------------------
282
+ ActiveadminCmsTest: test_truth
283
+ ------------------------------
284
+  (0.1ms) SAVEPOINT active_record_1
285
+  (0.0ms) RELEASE SAVEPOINT active_record_1
286
+  (0.0ms) SAVEPOINT active_record_1
287
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
288
+  (0.1ms) rollback transaction
289
+  (1.3ms) DELETE FROM "activeadmin_cms_posts";
290
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
291
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_posts';
292
+  (5.8ms) DELETE FROM "activeadmin_cms_pages";
293
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
294
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_pages';
295
+  (0.1ms) begin transaction
296
+ -----------------------------------------------------
297
+ #publish: test_0001_should change status to published
298
+ -----------------------------------------------------
299
+  (0.1ms) SAVEPOINT active_record_1
300
+  (0.0ms) RELEASE SAVEPOINT active_record_1
301
+  (0.0ms) SAVEPOINT active_record_1
302
+ SQL (5.5ms) INSERT INTO "activeadmin_cms_pages" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "Foo content"], ["created_at", Sun, 20 Oct 2013 17:58:48 UTC +00:00], ["title", "Foo page"], ["updated_at", Sun, 20 Oct 2013 17:58:48 UTC +00:00]]
303
+ SQL (0.4ms) UPDATE "activeadmin_cms_pages" SET "content" = ?, "published" = ?, "updated_at" = ? WHERE "activeadmin_cms_pages"."id" = 1 [["content", nil], ["published", true], ["updated_at", Sun, 20 Oct 2013 17:58:48 UTC +00:00]]
304
+ ActiveadminCms::Page Load (0.3ms) SELECT "activeadmin_cms_pages".* FROM "activeadmin_cms_pages" WHERE "activeadmin_cms_pages"."id" = ? LIMIT 1 [["id", 1]]
305
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
306
+  (0.4ms) rollback transaction
307
+  (0.1ms) begin transaction
308
+ --------------------------------------------------
309
+ #publish: test_0002_should move content from draft
310
+ --------------------------------------------------
311
+  (0.0ms) SAVEPOINT active_record_1
312
+  (0.0ms) RELEASE SAVEPOINT active_record_1
313
+  (0.0ms) SAVEPOINT active_record_1
314
+ SQL (0.4ms) INSERT INTO "activeadmin_cms_pages" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "Foo content"], ["created_at", Sun, 20 Oct 2013 17:58:48 UTC +00:00], ["title", "Foo page"], ["updated_at", Sun, 20 Oct 2013 17:58:48 UTC +00:00]]
315
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
316
+  (0.3ms) rollback transaction
317
+  (0.1ms) begin transaction
318
+ ------------------------------
319
+ ActiveadminCmsTest: test_truth
320
+ ------------------------------
321
+  (0.1ms) SAVEPOINT active_record_1
322
+  (0.0ms) RELEASE SAVEPOINT active_record_1
323
+  (0.0ms) SAVEPOINT active_record_1
324
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
325
+  (0.0ms) rollback transaction
326
+  (1.2ms) DELETE FROM "activeadmin_cms_posts";
327
+  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
328
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_posts';
329
+  (1.9ms) DELETE FROM "activeadmin_cms_pages";
330
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
331
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_pages';
332
+  (0.1ms) begin transaction
333
+ -----------------------------------------------------
334
+ #publish: test_0001_should change status to published
335
+ -----------------------------------------------------
336
+  (0.1ms) SAVEPOINT active_record_1
337
+  (0.0ms) RELEASE SAVEPOINT active_record_1
338
+  (0.0ms) SAVEPOINT active_record_1
339
+ SQL (5.0ms) INSERT INTO "activeadmin_cms_pages" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "Foo content"], ["created_at", Sun, 20 Oct 2013 17:59:10 UTC +00:00], ["title", "Foo page"], ["updated_at", Sun, 20 Oct 2013 17:59:10 UTC +00:00]]
340
+ SQL (0.2ms) UPDATE "activeadmin_cms_pages" SET "content" = ?, "published" = ?, "updated_at" = ? WHERE "activeadmin_cms_pages"."id" = 1 [["content", nil], ["published", true], ["updated_at", Sun, 20 Oct 2013 17:59:10 UTC +00:00]]
341
+ ActiveadminCms::Page Load (0.1ms) SELECT "activeadmin_cms_pages".* FROM "activeadmin_cms_pages" WHERE "activeadmin_cms_pages"."id" = ? LIMIT 1 [["id", 1]]
342
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
343
+  (0.4ms) rollback transaction
344
+  (0.1ms) begin transaction
345
+ --------------------------------------------------
346
+ #publish: test_0002_should move content from draft
347
+ --------------------------------------------------
348
+  (0.0ms) SAVEPOINT active_record_1
349
+  (0.0ms) RELEASE SAVEPOINT active_record_1
350
+  (0.0ms) SAVEPOINT active_record_1
351
+ SQL (0.3ms) INSERT INTO "activeadmin_cms_pages" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "Foo content"], ["created_at", Sun, 20 Oct 2013 17:59:10 UTC +00:00], ["title", "Foo page"], ["updated_at", Sun, 20 Oct 2013 17:59:10 UTC +00:00]]
352
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
353
+  (0.5ms) rollback transaction
354
+  (0.1ms) begin transaction
355
+ ------------------------------
356
+ ActiveadminCmsTest: test_truth
357
+ ------------------------------
358
+  (0.1ms) SAVEPOINT active_record_1
359
+  (0.0ms) RELEASE SAVEPOINT active_record_1
360
+  (0.0ms) SAVEPOINT active_record_1
361
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
362
+  (0.0ms) rollback transaction
363
+  (1.4ms) DELETE FROM "activeadmin_cms_posts";
364
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
365
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_posts';
366
+  (1.9ms) DELETE FROM "activeadmin_cms_pages";
367
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
368
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_pages';
369
+  (0.1ms) begin transaction
370
+ -----------------------------------------------------
371
+ #publish: test_0001_should change status to published
372
+ -----------------------------------------------------
373
+  (0.0ms) SAVEPOINT active_record_1
374
+  (0.0ms) RELEASE SAVEPOINT active_record_1
375
+  (0.0ms) SAVEPOINT active_record_1
376
+ SQL (6.0ms) INSERT INTO "activeadmin_cms_pages" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "Foo content"], ["created_at", Sun, 20 Oct 2013 17:59:23 UTC +00:00], ["title", "Foo page"], ["updated_at", Sun, 20 Oct 2013 17:59:23 UTC +00:00]]
377
+ SQL (0.3ms) UPDATE "activeadmin_cms_pages" SET "content" = ?, "published" = ?, "updated_at" = ? WHERE "activeadmin_cms_pages"."id" = 1 [["content", nil], ["published", true], ["updated_at", Sun, 20 Oct 2013 17:59:23 UTC +00:00]]
378
+ ActiveadminCms::Page Load (0.1ms) SELECT "activeadmin_cms_pages".* FROM "activeadmin_cms_pages" WHERE "activeadmin_cms_pages"."id" = ? LIMIT 1 [["id", 1]]
379
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
380
+  (0.6ms) rollback transaction
381
+  (0.1ms) begin transaction
382
+ --------------------------------------------------
383
+ #publish: test_0002_should move content from draft
384
+ --------------------------------------------------
385
+  (0.0ms) SAVEPOINT active_record_1
386
+  (0.0ms) RELEASE SAVEPOINT active_record_1
387
+  (0.0ms) SAVEPOINT active_record_1
388
+ SQL (0.3ms) INSERT INTO "activeadmin_cms_pages" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "Foo content"], ["created_at", Sun, 20 Oct 2013 17:59:23 UTC +00:00], ["title", "Foo page"], ["updated_at", Sun, 20 Oct 2013 17:59:23 UTC +00:00]]
389
+ SQL (0.1ms) UPDATE "activeadmin_cms_pages" SET "draft_content" = ?, "content" = ?, "published" = ?, "updated_at" = ? WHERE "activeadmin_cms_pages"."id" = 1 [["draft_content", "new content"], ["content", "new content"], ["published", true], ["updated_at", Sun, 20 Oct 2013 17:59:23 UTC +00:00]]
390
+ ActiveadminCms::Page Load (0.0ms) SELECT "activeadmin_cms_pages".* FROM "activeadmin_cms_pages" WHERE "activeadmin_cms_pages"."id" = ? LIMIT 1 [["id", 1]]
391
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
392
+  (0.4ms) rollback transaction
393
+  (0.1ms) begin transaction
394
+ ------------------------------
395
+ ActiveadminCmsTest: test_truth
396
+ ------------------------------
397
+  (0.1ms) SAVEPOINT active_record_1
398
+  (0.0ms) RELEASE SAVEPOINT active_record_1
399
+  (0.0ms) SAVEPOINT active_record_1
400
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
401
+  (0.1ms) rollback transaction
402
+  (1.4ms) DELETE FROM "activeadmin_cms_posts";
403
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
404
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_posts';
405
+  (1.9ms) DELETE FROM "activeadmin_cms_pages";
406
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
407
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_pages';
408
+  (0.1ms) begin transaction
409
+ -----------------------------------------------------
410
+ #publish: test_0001_should change status to published
411
+ -----------------------------------------------------
412
+  (0.1ms) SAVEPOINT active_record_1
413
+  (0.1ms) RELEASE SAVEPOINT active_record_1
414
+  (0.1ms) SAVEPOINT active_record_1
415
+ SQL (5.8ms) INSERT INTO "activeadmin_cms_pages" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "Foo content"], ["created_at", Sun, 20 Oct 2013 18:00:51 UTC +00:00], ["title", "Foo page"], ["updated_at", Sun, 20 Oct 2013 18:00:51 UTC +00:00]]
416
+ SQL (0.2ms) UPDATE "activeadmin_cms_pages" SET "content" = ?, "published" = ?, "updated_at" = ? WHERE "activeadmin_cms_pages"."id" = 1 [["content", nil], ["published", true], ["updated_at", Sun, 20 Oct 2013 18:00:51 UTC +00:00]]
417
+ ActiveadminCms::Page Load (0.1ms) SELECT "activeadmin_cms_pages".* FROM "activeadmin_cms_pages" WHERE "activeadmin_cms_pages"."id" = ? LIMIT 1 [["id", 1]]
418
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
419
+  (0.5ms) rollback transaction
420
+  (0.1ms) begin transaction
421
+ --------------------------------------------------
422
+ #publish: test_0002_should move content from draft
423
+ --------------------------------------------------
424
+  (0.0ms) SAVEPOINT active_record_1
425
+  (0.0ms) RELEASE SAVEPOINT active_record_1
426
+  (0.0ms) SAVEPOINT active_record_1
427
+ SQL (0.5ms) INSERT INTO "activeadmin_cms_pages" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "Foo content"], ["created_at", Sun, 20 Oct 2013 18:00:51 UTC +00:00], ["title", "Foo page"], ["updated_at", Sun, 20 Oct 2013 18:00:51 UTC +00:00]]
428
+ SQL (0.1ms) UPDATE "activeadmin_cms_pages" SET "draft_content" = ?, "content" = ?, "published" = ?, "updated_at" = ? WHERE "activeadmin_cms_pages"."id" = 1 [["draft_content", "new content"], ["content", "new content"], ["published", true], ["updated_at", Sun, 20 Oct 2013 18:00:51 UTC +00:00]]
429
+ ActiveadminCms::Page Load (0.0ms) SELECT "activeadmin_cms_pages".* FROM "activeadmin_cms_pages" WHERE "activeadmin_cms_pages"."id" = ? LIMIT 1 [["id", 1]]
430
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
431
+  (0.7ms) rollback transaction
432
+  (0.1ms) begin transaction
433
+ ------------------------------
434
+ ActiveadminCmsTest: test_truth
435
+ ------------------------------
436
+  (0.1ms) SAVEPOINT active_record_1
437
+  (0.1ms) RELEASE SAVEPOINT active_record_1
438
+  (0.0ms) SAVEPOINT active_record_1
439
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
440
+  (0.0ms) rollback transaction
441
+  (1.2ms) DELETE FROM "activeadmin_cms_posts";
442
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
443
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_posts';
444
+  (0.9ms) DELETE FROM "activeadmin_cms_pages";
445
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
446
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_pages';
447
+  (0.1ms) begin transaction
448
+ -----------------------------------------------------
449
+ #publish: test_0001_should change status to published
450
+ -----------------------------------------------------
451
+  (0.1ms) SAVEPOINT active_record_1
452
+  (0.0ms) RELEASE SAVEPOINT active_record_1
453
+  (0.0ms) SAVEPOINT active_record_1
454
+ SQL (5.2ms) INSERT INTO "activeadmin_cms_posts" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "Foo content"], ["created_at", Sun, 20 Oct 2013 18:01:28 UTC +00:00], ["title", "Foo post"], ["updated_at", Sun, 20 Oct 2013 18:01:28 UTC +00:00]]
455
+ SQL (0.2ms) UPDATE "activeadmin_cms_posts" SET "published" = ?, "updated_at" = ? WHERE "activeadmin_cms_posts"."id" = 1 [["published", true], ["updated_at", Sun, 20 Oct 2013 18:01:28 UTC +00:00]]
456
+ ActiveadminCms::Post Load (0.2ms) SELECT "activeadmin_cms_posts".* FROM "activeadmin_cms_posts" WHERE "activeadmin_cms_posts"."id" = ? LIMIT 1 [["id", 1]]
457
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
458
+  (0.4ms) rollback transaction
459
+  (0.1ms) begin transaction
460
+ -----------------------------------------------------
461
+ #publish: test_0001_should change status to published
462
+ -----------------------------------------------------
463
+  (0.1ms) SAVEPOINT active_record_1
464
+  (0.1ms) RELEASE SAVEPOINT active_record_1
465
+  (0.1ms) SAVEPOINT active_record_1
466
+ SQL (0.8ms) INSERT INTO "activeadmin_cms_pages" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "Foo content"], ["created_at", Sun, 20 Oct 2013 18:01:28 UTC +00:00], ["title", "Foo page"], ["updated_at", Sun, 20 Oct 2013 18:01:28 UTC +00:00]]
467
+ SQL (0.2ms) UPDATE "activeadmin_cms_pages" SET "content" = ?, "published" = ?, "updated_at" = ? WHERE "activeadmin_cms_pages"."id" = 1 [["content", nil], ["published", true], ["updated_at", Sun, 20 Oct 2013 18:01:28 UTC +00:00]]
468
+ ActiveadminCms::Page Load (0.1ms) SELECT "activeadmin_cms_pages".* FROM "activeadmin_cms_pages" WHERE "activeadmin_cms_pages"."id" = ? LIMIT 1 [["id", 1]]
469
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
470
+  (0.5ms) rollback transaction
471
+  (0.1ms) begin transaction
472
+ --------------------------------------------------
473
+ #publish: test_0002_should move content from draft
474
+ --------------------------------------------------
475
+  (0.0ms) SAVEPOINT active_record_1
476
+  (0.0ms) RELEASE SAVEPOINT active_record_1
477
+  (0.0ms) SAVEPOINT active_record_1
478
+ SQL (0.3ms) INSERT INTO "activeadmin_cms_pages" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "Foo content"], ["created_at", Sun, 20 Oct 2013 18:01:28 UTC +00:00], ["title", "Foo page"], ["updated_at", Sun, 20 Oct 2013 18:01:28 UTC +00:00]]
479
+ SQL (0.1ms) UPDATE "activeadmin_cms_pages" SET "draft_content" = ?, "content" = ?, "published" = ?, "updated_at" = ? WHERE "activeadmin_cms_pages"."id" = 1 [["draft_content", "new content"], ["content", "new content"], ["published", true], ["updated_at", Sun, 20 Oct 2013 18:01:28 UTC +00:00]]
480
+ ActiveadminCms::Page Load (0.0ms) SELECT "activeadmin_cms_pages".* FROM "activeadmin_cms_pages" WHERE "activeadmin_cms_pages"."id" = ? LIMIT 1 [["id", 1]]
481
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
482
+  (0.5ms) rollback transaction
483
+  (0.1ms) begin transaction
484
+ ------------------------------
485
+ ActiveadminCmsTest: test_truth
486
+ ------------------------------
487
+  (0.1ms) SAVEPOINT active_record_1
488
+  (0.0ms) RELEASE SAVEPOINT active_record_1
489
+  (0.0ms) SAVEPOINT active_record_1
490
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
491
+  (0.1ms) rollback transaction
492
+  (9.5ms) DELETE FROM "activeadmin_cms_posts";
493
+  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
494
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_posts';
495
+  (5.5ms) DELETE FROM "activeadmin_cms_pages";
496
+  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
497
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_pages';
498
+  (0.1ms) begin transaction
499
+ -----------------------------------------------------
500
+ #publish: test_0001_should change status to published
501
+ -----------------------------------------------------
502
+  (0.1ms) SAVEPOINT active_record_1
503
+  (0.0ms) RELEASE SAVEPOINT active_record_1
504
+  (0.0ms) SAVEPOINT active_record_1
505
+ SQL (5.5ms) INSERT INTO "activeadmin_cms_posts" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "Foo content"], ["created_at", Sun, 20 Oct 2013 18:07:35 UTC +00:00], ["title", "Foo post"], ["updated_at", Sun, 20 Oct 2013 18:07:35 UTC +00:00]]
506
+ SQL (0.3ms) UPDATE "activeadmin_cms_posts" SET "published" = ?, "updated_at" = ? WHERE "activeadmin_cms_posts"."id" = 1 [["published", true], ["updated_at", Sun, 20 Oct 2013 18:07:35 UTC +00:00]]
507
+ ActiveadminCms::Post Load (0.2ms) SELECT "activeadmin_cms_posts".* FROM "activeadmin_cms_posts" WHERE "activeadmin_cms_posts"."id" = ? LIMIT 1 [["id", 1]]
508
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
509
+  (1.1ms) rollback transaction
510
+  (0.1ms) begin transaction
511
+ -----------------------------------------------------
512
+ #publish: test_0001_should change status to published
513
+ -----------------------------------------------------
514
+  (0.1ms) SAVEPOINT active_record_1
515
+  (0.0ms) RELEASE SAVEPOINT active_record_1
516
+  (0.0ms) SAVEPOINT active_record_1
517
+ SQL (0.5ms) INSERT INTO "activeadmin_cms_pages" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "Foo content"], ["created_at", Sun, 20 Oct 2013 18:07:35 UTC +00:00], ["title", "Foo page"], ["updated_at", Sun, 20 Oct 2013 18:07:35 UTC +00:00]]
518
+ SQL (0.2ms) UPDATE "activeadmin_cms_pages" SET "content" = ?, "published" = ?, "updated_at" = ? WHERE "activeadmin_cms_pages"."id" = 1 [["content", nil], ["published", true], ["updated_at", Sun, 20 Oct 2013 18:07:35 UTC +00:00]]
519
+ ActiveadminCms::Page Load (0.1ms) SELECT "activeadmin_cms_pages".* FROM "activeadmin_cms_pages" WHERE "activeadmin_cms_pages"."id" = ? LIMIT 1 [["id", 1]]
520
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
521
+  (0.4ms) rollback transaction
522
+  (0.1ms) begin transaction
523
+ --------------------------------------------------
524
+ #publish: test_0002_should move content from draft
525
+ --------------------------------------------------
526
+  (0.0ms) SAVEPOINT active_record_1
527
+  (0.0ms) RELEASE SAVEPOINT active_record_1
528
+  (0.0ms) SAVEPOINT active_record_1
529
+ SQL (0.3ms) INSERT INTO "activeadmin_cms_pages" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "Foo content"], ["created_at", Sun, 20 Oct 2013 18:07:35 UTC +00:00], ["title", "Foo page"], ["updated_at", Sun, 20 Oct 2013 18:07:35 UTC +00:00]]
530
+ SQL (0.1ms) UPDATE "activeadmin_cms_pages" SET "draft_content" = ?, "content" = ?, "published" = ?, "updated_at" = ? WHERE "activeadmin_cms_pages"."id" = 1 [["draft_content", "new content"], ["content", "new content"], ["published", true], ["updated_at", Sun, 20 Oct 2013 18:07:35 UTC +00:00]]
531
+ ActiveadminCms::Page Load (0.0ms) SELECT "activeadmin_cms_pages".* FROM "activeadmin_cms_pages" WHERE "activeadmin_cms_pages"."id" = ? LIMIT 1 [["id", 1]]
532
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
533
+  (0.4ms) rollback transaction
534
+  (0.1ms) begin transaction
535
+ ------------------------------
536
+ ActiveadminCmsTest: test_truth
537
+ ------------------------------
538
+  (0.1ms) SAVEPOINT active_record_1
539
+  (0.0ms) RELEASE SAVEPOINT active_record_1
540
+  (0.0ms) SAVEPOINT active_record_1
541
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
542
+  (0.0ms) rollback transaction
543
+  (1.4ms) DELETE FROM "activeadmin_cms_posts";
544
+  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
545
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_posts';
546
+  (1.2ms) DELETE FROM "activeadmin_cms_pages";
547
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
548
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_pages';
549
+  (0.1ms) begin transaction
550
+ -----------------------------------------------------
551
+ #publish: test_0001_should change status to published
552
+ -----------------------------------------------------
553
+  (0.1ms) SAVEPOINT active_record_1
554
+  (0.0ms) RELEASE SAVEPOINT active_record_1
555
+  (0.0ms) SAVEPOINT active_record_1
556
+ SQL (6.1ms) INSERT INTO "activeadmin_cms_posts" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "Foo content"], ["created_at", Sun, 20 Oct 2013 18:24:47 UTC +00:00], ["title", "Foo post"], ["updated_at", Sun, 20 Oct 2013 18:24:47 UTC +00:00]]
557
+ SQL (0.2ms) UPDATE "activeadmin_cms_posts" SET "published" = ?, "updated_at" = ? WHERE "activeadmin_cms_posts"."id" = 1 [["published", true], ["updated_at", Sun, 20 Oct 2013 18:24:48 UTC +00:00]]
558
+ ActiveadminCms::Post Load (0.1ms) SELECT "activeadmin_cms_posts".* FROM "activeadmin_cms_posts" WHERE "activeadmin_cms_posts"."id" = ? LIMIT 1 [["id", 1]]
559
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
560
+  (0.4ms) rollback transaction
561
+  (0.1ms) begin transaction
562
+ -----------------------------------------------------
563
+ #publish: test_0001_should change status to published
564
+ -----------------------------------------------------
565
+  (0.0ms) SAVEPOINT active_record_1
566
+  (0.0ms) RELEASE SAVEPOINT active_record_1
567
+  (0.0ms) SAVEPOINT active_record_1
568
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
569
+  (0.1ms) rollback transaction
570
+  (0.0ms) begin transaction
571
+ --------------------------------------------------
572
+ #publish: test_0002_should move content from draft
573
+ --------------------------------------------------
574
+  (0.0ms) SAVEPOINT active_record_1
575
+  (0.0ms) RELEASE SAVEPOINT active_record_1
576
+  (0.0ms) SAVEPOINT active_record_1
577
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
578
+  (0.0ms) rollback transaction
579
+  (0.1ms) begin transaction
580
+ ------------------------------
581
+ ActiveadminCmsTest: test_truth
582
+ ------------------------------
583
+  (0.1ms) SAVEPOINT active_record_1
584
+  (0.0ms) RELEASE SAVEPOINT active_record_1
585
+  (0.0ms) SAVEPOINT active_record_1
586
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
587
+  (0.0ms) rollback transaction
588
+  (1.2ms) DELETE FROM "activeadmin_cms_posts";
589
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
590
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_posts';
591
+  (1.0ms) DELETE FROM "activeadmin_cms_pages";
592
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
593
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_pages';
594
+  (0.1ms) begin transaction
595
+ -----------------------------------------------------
596
+ #publish: test_0001_should change status to published
597
+ -----------------------------------------------------
598
+  (0.0ms) SAVEPOINT active_record_1
599
+  (0.0ms) RELEASE SAVEPOINT active_record_1
600
+  (0.0ms) SAVEPOINT active_record_1
601
+ SQL (5.6ms) INSERT INTO "activeadmin_cms_posts" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "Foo content"], ["created_at", Sun, 20 Oct 2013 18:25:57 UTC +00:00], ["title", "Foo post"], ["updated_at", Sun, 20 Oct 2013 18:25:57 UTC +00:00]]
602
+ SQL (0.2ms) UPDATE "activeadmin_cms_posts" SET "published" = ?, "updated_at" = ? WHERE "activeadmin_cms_posts"."id" = 1 [["published", true], ["updated_at", Sun, 20 Oct 2013 18:25:57 UTC +00:00]]
603
+ ActiveadminCms::Post Load (0.1ms) SELECT "activeadmin_cms_posts".* FROM "activeadmin_cms_posts" WHERE "activeadmin_cms_posts"."id" = ? LIMIT 1 [["id", 1]]
604
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
605
+  (0.4ms) rollback transaction
606
+  (0.1ms) begin transaction
607
+ -----------------------------------------------------
608
+ #publish: test_0001_should change status to published
609
+ -----------------------------------------------------
610
+  (0.0ms) SAVEPOINT active_record_1
611
+  (0.0ms) RELEASE SAVEPOINT active_record_1
612
+  (0.0ms) SAVEPOINT active_record_1
613
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
614
+  (0.1ms) rollback transaction
615
+  (0.1ms) begin transaction
616
+ --------------------------------------------------
617
+ #publish: test_0002_should move content from draft
618
+ --------------------------------------------------
619
+  (0.0ms) SAVEPOINT active_record_1
620
+  (0.0ms) RELEASE SAVEPOINT active_record_1
621
+  (0.0ms) SAVEPOINT active_record_1
622
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
623
+  (0.0ms) rollback transaction
624
+  (0.0ms) begin transaction
625
+ ------------------------------
626
+ ActiveadminCmsTest: test_truth
627
+ ------------------------------
628
+  (0.0ms) SAVEPOINT active_record_1
629
+  (0.0ms) RELEASE SAVEPOINT active_record_1
630
+  (0.0ms) SAVEPOINT active_record_1
631
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
632
+  (0.0ms) rollback transaction
633
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
634
+ Migrating to AddSlugToActiveadminCmsPages (20131020181730)
635
+  (0.1ms) begin transaction
636
+  (0.6ms) ALTER TABLE "activeadmin_cms_pages" ADD "slug" varchar(255)
637
+  (0.1ms) CREATE INDEX "index_activeadmin_cms_pages_on_slug" ON "activeadmin_cms_pages" ("slug")
638
+ SQL (1.5ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131020181730"]]
639
+  (1.0ms) commit transaction
640
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
641
+  (1.3ms) DELETE FROM "activeadmin_cms_posts";
642
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
643
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_posts';
644
+  (5.7ms) DELETE FROM "activeadmin_cms_pages";
645
+  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
646
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_pages';
647
+  (0.1ms) begin transaction
648
+ -----------------------------------------------------
649
+ #publish: test_0001_should change status to published
650
+ -----------------------------------------------------
651
+  (0.1ms) SAVEPOINT active_record_1
652
+  (0.1ms) RELEASE SAVEPOINT active_record_1
653
+  (0.1ms) SAVEPOINT active_record_1
654
+ SQL (7.0ms) INSERT INTO "activeadmin_cms_posts" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "Foo content"], ["created_at", Sun, 20 Oct 2013 18:26:21 UTC +00:00], ["title", "Foo post"], ["updated_at", Sun, 20 Oct 2013 18:26:21 UTC +00:00]]
655
+ SQL (0.2ms) UPDATE "activeadmin_cms_posts" SET "published" = ?, "updated_at" = ? WHERE "activeadmin_cms_posts"."id" = 1 [["published", true], ["updated_at", Sun, 20 Oct 2013 18:26:21 UTC +00:00]]
656
+ ActiveadminCms::Post Load (0.1ms) SELECT "activeadmin_cms_posts".* FROM "activeadmin_cms_posts" WHERE "activeadmin_cms_posts"."id" = ? LIMIT 1 [["id", 1]]
657
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
658
+  (0.5ms) rollback transaction
659
+  (0.0ms) begin transaction
660
+ -----------------------------------------------------
661
+ #publish: test_0001_should change status to published
662
+ -----------------------------------------------------
663
+  (0.0ms) SAVEPOINT active_record_1
664
+  (0.0ms) RELEASE SAVEPOINT active_record_1
665
+  (0.0ms) SAVEPOINT active_record_1
666
+ ActiveadminCms::Page Exists (0.1ms) SELECT 1 AS one FROM "activeadmin_cms_pages" WHERE "activeadmin_cms_pages"."slug" = 'slug-1' LIMIT 1
667
+ SQL (0.5ms) INSERT INTO "activeadmin_cms_pages" ("content", "created_at", "slug", "title", "updated_at") VALUES (?, ?, ?, ?, ?) [["content", "Foo content"], ["created_at", Sun, 20 Oct 2013 18:26:21 UTC +00:00], ["slug", "slug-1"], ["title", "Foo page"], ["updated_at", Sun, 20 Oct 2013 18:26:21 UTC +00:00]]
668
+ ActiveadminCms::Page Exists (0.1ms) SELECT 1 AS one FROM "activeadmin_cms_pages" WHERE ("activeadmin_cms_pages"."slug" = 'slug-1' AND "activeadmin_cms_pages"."id" != 1) LIMIT 1
669
+ SQL (0.2ms) UPDATE "activeadmin_cms_pages" SET "content" = ?, "published" = ?, "updated_at" = ? WHERE "activeadmin_cms_pages"."id" = 1 [["content", nil], ["published", true], ["updated_at", Sun, 20 Oct 2013 18:26:21 UTC +00:00]]
670
+ ActiveadminCms::Page Load (0.1ms) SELECT "activeadmin_cms_pages".* FROM "activeadmin_cms_pages" WHERE "activeadmin_cms_pages"."id" = ? LIMIT 1 [["id", 1]]
671
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
672
+  (0.4ms) rollback transaction
673
+  (0.0ms) begin transaction
674
+ --------------------------------------------------
675
+ #publish: test_0002_should move content from draft
676
+ --------------------------------------------------
677
+  (0.0ms) SAVEPOINT active_record_1
678
+  (0.0ms) RELEASE SAVEPOINT active_record_1
679
+  (0.0ms) SAVEPOINT active_record_1
680
+ ActiveadminCms::Page Exists (0.2ms) SELECT 1 AS one FROM "activeadmin_cms_pages" WHERE "activeadmin_cms_pages"."slug" = 'slug-2' LIMIT 1
681
+ SQL (0.4ms) INSERT INTO "activeadmin_cms_pages" ("content", "created_at", "slug", "title", "updated_at") VALUES (?, ?, ?, ?, ?) [["content", "Foo content"], ["created_at", Sun, 20 Oct 2013 18:26:21 UTC +00:00], ["slug", "slug-2"], ["title", "Foo page"], ["updated_at", Sun, 20 Oct 2013 18:26:21 UTC +00:00]]
682
+ ActiveadminCms::Page Exists (0.2ms) SELECT 1 AS one FROM "activeadmin_cms_pages" WHERE ("activeadmin_cms_pages"."slug" = 'slug-2' AND "activeadmin_cms_pages"."id" != 1) LIMIT 1
683
+ SQL (0.2ms) UPDATE "activeadmin_cms_pages" SET "draft_content" = ?, "content" = ?, "published" = ?, "updated_at" = ? WHERE "activeadmin_cms_pages"."id" = 1 [["draft_content", "new content"], ["content", "new content"], ["published", true], ["updated_at", Sun, 20 Oct 2013 18:26:21 UTC +00:00]]
684
+ ActiveadminCms::Page Load (0.0ms) SELECT "activeadmin_cms_pages".* FROM "activeadmin_cms_pages" WHERE "activeadmin_cms_pages"."id" = ? LIMIT 1 [["id", 1]]
685
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
686
+  (0.5ms) rollback transaction
687
+  (0.0ms) begin transaction
688
+ ------------------------------
689
+ ActiveadminCmsTest: test_truth
690
+ ------------------------------
691
+  (0.1ms) SAVEPOINT active_record_1
692
+  (0.0ms) RELEASE SAVEPOINT active_record_1
693
+  (0.0ms) SAVEPOINT active_record_1
694
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
695
+  (0.0ms) rollback transaction
@@ -0,0 +1,15 @@
1
+ FactoryGirl.define do
2
+ factory :page, class: ActiveadminCms::Page do
3
+ title "Foo page"
4
+ content "Foo content"
5
+ slug { generate(:slug) }
6
+ end
7
+
8
+ factory :draft_page, parent: :page do
9
+ published false
10
+ end
11
+
12
+ factory :published_page, parent: :page do
13
+ published false
14
+ end
15
+ end
@@ -0,0 +1,14 @@
1
+ FactoryGirl.define do
2
+ factory :post, class: ActiveadminCms::Post do
3
+ title "Foo post"
4
+ content "Foo content"
5
+ end
6
+
7
+ factory :draft_post, parent: :post do
8
+ published false
9
+ end
10
+
11
+ factory :published_post, parent: :post do
12
+ published false
13
+ end
14
+ end
@@ -0,0 +1,5 @@
1
+ FactoryGirl.define do
2
+ sequence :slug do |n|
3
+ "slug-#{n}"
4
+ end
5
+ end
@@ -0,0 +1,20 @@
1
+ require 'test_helper'
2
+
3
+ class ActiveadminCms::PagesServiceTest < ActiveSupport::TestCase
4
+ let(:subject) { ActiveadminCms::PagesService }
5
+ let(:page) { create(:page) }
6
+
7
+ describe '#publish' do
8
+ let(:page) { create(:draft_page) }
9
+ it 'should change status to published' do
10
+ subject.publish(page)
11
+ assert_equal page.reload.published?, true
12
+ end
13
+
14
+ it 'should move content from draft' do
15
+ page.draft_content = "new content"
16
+ subject.publish(page)
17
+ assert_equal page.reload.content, "new content"
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,14 @@
1
+ require 'test_helper'
2
+
3
+ class ActiveadminCms::PostsServiceTest < ActiveSupport::TestCase
4
+ let(:subject) { ActiveadminCms::PostsService }
5
+ let(:post) { create(:post) }
6
+
7
+ describe '#publish' do
8
+ let(:post) { create(:draft_post) }
9
+ it 'should change status to published' do
10
+ subject.publish(post)
11
+ assert_equal post.reload.published?, true
12
+ end
13
+ end
14
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin_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
  - Iskander Haziev
@@ -178,13 +178,15 @@ files:
178
178
  - app/assets/stylesheets/activeadmin_cms/base.css
179
179
  - app/assets/stylesheets/activeadmin_cms/editor/ace.css
180
180
  - app/controllers/activeadmin_cms/application_controller.rb
181
- - app/helpers/activeadmin_cms/application_helper.rb
182
181
  - app/models/activeadmin_cms/page.rb
183
182
  - app/models/activeadmin_cms/post.rb
183
+ - app/services/activeadmin_cms/pages_service.rb
184
+ - app/services/activeadmin_cms/posts_service.rb
184
185
  - app/views/layouts/activeadmin_cms/application.html.erb
185
186
  - config/routes.rb
186
187
  - db/migrate/20131020140024_create_activeadmin_cms_posts.rb
187
188
  - db/migrate/20131020152912_create_activeadmin_cms_pages.rb
189
+ - db/migrate/20131020181730_add_slug_to_activeadmin_cms_pages.rb
188
190
  - lib/activeadmin_cms/engine.rb
189
191
  - lib/activeadmin_cms/version.rb
190
192
  - lib/activeadmin_cms.rb
@@ -232,8 +234,11 @@ files:
232
234
  - test/dummy/README.rdoc
233
235
  - test/factories/pages.rb
234
236
  - test/factories/posts.rb
237
+ - test/factories/sequences.rb
235
238
  - test/models/activeadmin_cms/page_test.rb
236
239
  - test/models/activeadmin_cms/post_test.rb
240
+ - test/services/pages_service_test.rb
241
+ - test/services/posts_service_test.rb
237
242
  - test/test_helper.rb
238
243
  homepage: https://github.com/droidlabs/activeadmin_cms
239
244
  licenses: []
@@ -298,6 +303,9 @@ test_files:
298
303
  - test/dummy/README.rdoc
299
304
  - test/factories/pages.rb
300
305
  - test/factories/posts.rb
306
+ - test/factories/sequences.rb
301
307
  - test/models/activeadmin_cms/page_test.rb
302
308
  - test/models/activeadmin_cms/post_test.rb
309
+ - test/services/pages_service_test.rb
310
+ - test/services/posts_service_test.rb
303
311
  - test/test_helper.rb
@@ -1,4 +0,0 @@
1
- module ActiveadminCms
2
- module ApplicationHelper
3
- end
4
- end