pulitzer 0.12.5 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/pulitzer.scss +107 -4
  3. data/app/controllers/pulitzer/arrangement_styles_controller.rb +52 -0
  4. data/app/controllers/pulitzer/background_styles_controller.rb +52 -0
  5. data/app/controllers/pulitzer/content_elements_controller.rb +2 -2
  6. data/app/controllers/pulitzer/free_form_section_types_controller.rb +2 -2
  7. data/app/controllers/pulitzer/justification_styles_controller.rb +52 -0
  8. data/app/controllers/pulitzer/layouts_controller.rb +2 -2
  9. data/app/controllers/pulitzer/partial_types_controller.rb +1 -1
  10. data/app/controllers/pulitzer/partials_controller.rb +2 -2
  11. data/app/controllers/pulitzer/post_tags_controller.rb +2 -2
  12. data/app/controllers/pulitzer/post_type_content_element_types_controller.rb +2 -2
  13. data/app/controllers/pulitzer/post_types_controller.rb +2 -2
  14. data/app/controllers/pulitzer/posts_controller.rb +1 -1
  15. data/app/controllers/pulitzer/sequence_flow_styles_controller.rb +52 -0
  16. data/app/controllers/pulitzer/tags_controller.rb +3 -3
  17. data/app/interactions/pulitzer/update_post_type_content_elements.rb +1 -1
  18. data/app/models/pulitzer/arrangement_style.rb +8 -0
  19. data/app/models/pulitzer/background_style.rb +8 -0
  20. data/app/models/pulitzer/content_element.rb +4 -0
  21. data/app/models/pulitzer/free_form_section_type.rb +5 -1
  22. data/app/models/pulitzer/justification_style.rb +8 -0
  23. data/app/models/pulitzer/partial.rb +39 -5
  24. data/app/models/pulitzer/partial_type.rb +2 -10
  25. data/app/models/pulitzer/post.rb +1 -1
  26. data/app/models/pulitzer/post_type.rb +4 -5
  27. data/app/models/pulitzer/post_type_content_element_type.rb +20 -1
  28. data/app/models/pulitzer/sequence_flow_style.rb +8 -0
  29. data/app/views/pulitzer/arrangement_styles/_form.html.erb +14 -0
  30. data/app/views/pulitzer/arrangement_styles/_form_fields.html.erb +6 -0
  31. data/app/views/pulitzer/arrangement_styles/_new.html.erb +12 -0
  32. data/app/views/pulitzer/arrangement_styles/_show.html.erb +10 -0
  33. data/app/views/pulitzer/arrangement_styles/_show_wrapper.html.erb +3 -0
  34. data/app/views/pulitzer/background_styles/_form.html.erb +14 -0
  35. data/app/views/pulitzer/background_styles/_form_fields.html.erb +6 -0
  36. data/app/views/pulitzer/background_styles/_new.html.erb +12 -0
  37. data/app/views/pulitzer/background_styles/_show.html.erb +10 -0
  38. data/app/views/pulitzer/background_styles/_show_wrapper.html.erb +3 -0
  39. data/app/views/pulitzer/free_form_section_types/_form.html.erb +16 -7
  40. data/app/views/pulitzer/free_form_section_types/_form_fields.html.erb +6 -4
  41. data/app/views/pulitzer/free_form_section_types/_new.html.erb +12 -7
  42. data/app/views/pulitzer/free_form_section_types/_show.html.erb +10 -12
  43. data/app/views/pulitzer/free_form_section_types/_show_wrapper.html.erb +2 -2
  44. data/app/views/pulitzer/justification_styles/_form.html.erb +14 -0
  45. data/app/views/pulitzer/justification_styles/_form_fields.html.erb +6 -0
  46. data/app/views/pulitzer/justification_styles/_new.html.erb +12 -0
  47. data/app/views/pulitzer/justification_styles/_show.html.erb +10 -0
  48. data/app/views/pulitzer/justification_styles/_show_wrapper.html.erb +3 -0
  49. data/app/views/pulitzer/partial_types/_index.html.erb +2 -2
  50. data/app/views/pulitzer/partial_types/_new.html.erb +1 -12
  51. data/app/views/pulitzer/partial_types/_show.html.erb +15 -5
  52. data/app/views/pulitzer/partial_types/_show_wrapper.html.erb +1 -1
  53. data/app/views/pulitzer/partials/_form.html.erb +31 -13
  54. data/app/views/pulitzer/partials/_new.html.erb +30 -11
  55. data/app/views/pulitzer/partials/_show.html.erb +8 -4
  56. data/app/views/pulitzer/post_type_content_element_types/_form.html.erb +12 -6
  57. data/app/views/pulitzer/post_type_content_element_types/_form_fields.html.erb +15 -13
  58. data/app/views/pulitzer/post_type_content_element_types/_new.html.erb +11 -6
  59. data/app/views/pulitzer/post_type_content_element_types/_show.html.erb +16 -9
  60. data/app/views/pulitzer/post_type_content_element_types/_show_wrapper.html.erb +2 -2
  61. data/app/views/pulitzer/post_types/_new.html.erb +1 -1
  62. data/app/views/pulitzer/post_types/_show.html.erb +10 -10
  63. data/app/views/pulitzer/post_types/_template.html.erb +98 -29
  64. data/app/views/pulitzer/sequence_flow_styles/_form.html.erb +14 -0
  65. data/app/views/pulitzer/sequence_flow_styles/_form_fields.html.erb +6 -0
  66. data/app/views/pulitzer/sequence_flow_styles/_new.html.erb +12 -0
  67. data/app/views/pulitzer/sequence_flow_styles/_show.html.erb +10 -0
  68. data/app/views/pulitzer/sequence_flow_styles/_show_wrapper.html.erb +3 -0
  69. data/config/routes.rb +5 -1
  70. data/db/migrate/20170518142411_create_pulitzer_background_classes.rb +9 -0
  71. data/db/migrate/20170518144418_create_pulitzer_justification_classes.rb +9 -0
  72. data/db/migrate/20170518144449_create_pulitzer_sequence_flow_classes.rb +9 -0
  73. data/db/migrate/20170518144515_create_pulitzer_arrangement_classes.rb +9 -0
  74. data/db/migrate/20170518145318_convert_pulitzer_layouts.rb +9 -0
  75. data/lib/pulitzer/content_element_helper.rb +5 -3
  76. data/lib/pulitzer/version.rb +1 -1
  77. data/spec/controllers/pulitzer/free_form_section_types_controller_spec.rb +6 -6
  78. data/spec/controllers/pulitzer/partials_controller_spec.rb +7 -7
  79. data/spec/controllers/pulitzer/post_types_controller_spec.rb +3 -3
  80. data/spec/controllers/pulitzer/versions_controller_spec.rb +8 -8
  81. data/spec/controllers/tags_controller_spec.rb +28 -29
  82. data/spec/dummy/app/controllers/application_controller.rb +1 -1
  83. data/spec/dummy/config/application.rb +0 -1
  84. data/spec/dummy/config/environments/test.rb +2 -2
  85. data/spec/dummy/db/schema.rb +30 -2
  86. data/spec/dummy/db/test.sqlite3 +0 -0
  87. data/spec/dummy/log/test.log +0 -3971
  88. data/spec/factories/partial_type.rb +0 -1
  89. data/spec/rails_helper.rb +1 -1
  90. metadata +35 -9
  91. data/app/views/pulitzer/layouts/_form.html.erb +0 -8
  92. data/app/views/pulitzer/layouts/_form_fields.html.erb +0 -2
  93. data/app/views/pulitzer/layouts/_new.html.erb +0 -7
  94. data/app/views/pulitzer/layouts/_show.html.erb +0 -9
  95. data/app/views/pulitzer/layouts/_show_wrapper.html.erb +0 -3
  96. data/spec/factories/layout.rb +0 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 96dbcc4d5fe1eef2969a1db92963cd9533e35271
4
- data.tar.gz: 7d09af83e984819e179de65061a8be0e5abe67b5
3
+ metadata.gz: 3d2d7cc8446631f6f65abda180cfd40f9f3dfa8b
4
+ data.tar.gz: 71a7331c8fc4a005449203107fa1fa6394c18930
5
5
  SHA512:
6
- metadata.gz: d5601422c4244bbd4cedad3f7904a605878f35559d1c603b72eff4d659362412f191c10ab7fb9113d89ba6900a25d3444694cebc8c2f2a2252466e733f31ea09
7
- data.tar.gz: 73922cc783e77cbc11729dc3d960e92bb585401ce081b2365a1770181c3390b9c64386e6ad22ec0d5de3c2cdf591e643f204103fbf6a2e758eeed3ba2518ece4
6
+ metadata.gz: 97453fae28a69a3084440983b18820553ac42bfd54157c3e78858e9bfc34db214a3fd0a48cb769f088ef7d1b00537f347ce695c24e73b893775f0b963cb238e0
7
+ data.tar.gz: 851d11433c5309e9a45f031b86c1be181211c7d81b0c76c7d5f2bec7705b6d757b06a0197858884e48d932d74bd89ab2d6ca3c89c8dd4318728952d1f7c68e27
@@ -136,15 +136,29 @@ body {
136
136
  .mce-panel, .mce-btn {
137
137
  background-color: inherit;
138
138
  }
139
+ &.highlight-blue{
140
+ padding: 20px;
141
+ background-color: #F1F8FB;
142
+ }
143
+ &.highlight-off-white{
144
+ padding: 20px;
145
+ background-color: #FFFBF8;
146
+ }
147
+ .pulitzer-span {
148
+ margin-left: 0;
149
+ position: relative;
150
+ float: left;
151
+ }
139
152
  }
140
153
  .pulitzer-span {
141
- margin-left: 0;
142
- position: relative;
143
- float: left;
144
154
  &.right {
145
155
  float: right;
146
156
  text-align: right;
147
157
  }
158
+ .right {
159
+ float: right;
160
+ text-align: right;
161
+ }
148
162
  &.left {
149
163
  text-align: left;
150
164
  float: left;
@@ -162,8 +176,97 @@ body {
162
176
  margin: 10px 0;
163
177
  }
164
178
  &.margin {
165
- margin-right: 1em;
179
+ margin-right: 15px;
180
+ margin-left: none;
181
+ }
182
+ &.heading {
183
+ color: #aaa;
184
+ }
185
+ &.empty {
186
+ background-color: #eee;
187
+ }
188
+ &.ten-percent {
189
+ width: 10%;
190
+ &.margin {
191
+ width: 8%;
192
+ margin-right: 2%;
193
+ }
194
+ @media screen and (max-width: 480px) {
195
+ width: 100%;
196
+ margin-right: none;
197
+ margin-left: none;
198
+ }
199
+ }
200
+ &.one-fifth {
201
+ width: 20%;
202
+ &.margin{
203
+ width: 18%;
204
+ margin-right: 2%;
205
+ }
206
+ @media screen and (max-width: 480px) {
207
+ width: 100%;
208
+ margin-right: none;
209
+ margin-left: none;
210
+ }
166
211
  }
212
+ &.two-fifths {
213
+ width: 40%;
214
+ &.margin{
215
+ width: 38%;
216
+ margin-right: 2%;
217
+ }
218
+ @media screen and (max-width: 480px) {
219
+ width: 100%;
220
+ margin-right: none;
221
+ margin-left: none;
222
+ }
223
+ }
224
+ &.one-quarter {
225
+ width: 25%;
226
+ &.margin{
227
+ width: 23%;
228
+ margin-right: 2%;
229
+ }
230
+ @media screen and (max-width: 480px) {
231
+ width: 100%;
232
+ margin-right: none;
233
+ margin-left: none;
234
+ }
235
+ }
236
+ &.one-third {
237
+ width: 33.3%;
238
+ &.margin{
239
+ width: 31.3%;
240
+ margin-right: 2%;
241
+ }
242
+ @media screen and (max-width: 480px) {
243
+ width: 100%;
244
+ margin-right: none;
245
+ margin-left: none;
246
+ }
247
+ }
248
+ &.one-half {
249
+ width: 50%;
250
+ &.margin{
251
+ width: 48%;
252
+ margin-right: 2%;
253
+ }
254
+ @media screen and (max-width: 480px) {
255
+ width: 100%;
256
+ margin-right: none;
257
+ margin-left: none;
258
+ }
259
+ }
260
+ input[type="submit"] {
261
+ margin: 0 15% 0 0;
262
+ width: 85%;
263
+ }
264
+
265
+ input[type="text"], select {
266
+ margin: 0 15% 0 0;
267
+ width: 85%;
268
+ }
269
+
167
270
  }
168
271
  .pulitzer-hidden{
169
272
  display: none;
@@ -0,0 +1,52 @@
1
+ class Pulitzer::ArrangementStylesController < Pulitzer::ApplicationController
2
+ before_action :get_arrangement_style, only: [:show, :edit, :update, :destroy]
3
+
4
+ def new
5
+ @arrangement_style = Pulitzer::ArrangementStyle.new(arrangement_style_params)
6
+ @post_type = @arrangement_style.post_type
7
+ render partial: 'new', locals: {arrangement_style: @arrangement_style}
8
+ end
9
+
10
+ def create
11
+ @arrangement_style = Pulitzer::ArrangementStyle.create(arrangement_style_params)
12
+ if @arrangement_style.errors.empty?
13
+ render partial: 'show_wrapper', locals: {arrangement_style: @arrangement_style}
14
+ else
15
+ @post_type = @arrangement_style.post_type
16
+ render partial: 'new', locals: {arrangement_style: @arrangement_style}
17
+ end
18
+ end
19
+
20
+ def show
21
+ render partial: 'show', locals: {arrangement_style: @arrangement_style}
22
+ end
23
+
24
+ def edit
25
+ render partial: 'form', locals: {arrangement_style: @arrangement_style}
26
+ end
27
+
28
+ def update
29
+ @arrangement_style.update_attributes(arrangement_style_params)
30
+ if @arrangement_style.errors.empty?
31
+ render partial: 'show', locals: {arrangement_style: @arrangement_style}
32
+ else
33
+ render partial: 'form', locals: {arrangement_style: @arrangement_style}, status: 409
34
+ end
35
+ end
36
+
37
+ def destroy
38
+ @arrangement_style.destroy
39
+ head :ok
40
+ end
41
+
42
+ protected
43
+
44
+ def get_arrangement_style
45
+ @arrangement_style = Pulitzer::ArrangementStyle.find(params[:id])
46
+ end
47
+
48
+ def arrangement_style_params
49
+ params[:arrangement_style].permit!
50
+ end
51
+
52
+ end
@@ -0,0 +1,52 @@
1
+ class Pulitzer::BackgroundStylesController < Pulitzer::ApplicationController
2
+ before_action :get_background_style, only: [:show, :edit, :update, :destroy]
3
+
4
+ def new
5
+ @background_style = Pulitzer::BackgroundStyle.new(background_style_params)
6
+ @post_type = @background_style.post_type
7
+ render partial: 'new', locals: {background_style: @background_style}
8
+ end
9
+
10
+ def create
11
+ @background_style = Pulitzer::BackgroundStyle.create(background_style_params)
12
+ if @background_style.errors.empty?
13
+ render partial: 'show_wrapper', locals: {background_style: @background_style}
14
+ else
15
+ @post_type = @background_style.post_type
16
+ render partial: 'new', locals: {background_style: @background_style}
17
+ end
18
+ end
19
+
20
+ def show
21
+ render partial: 'show', locals: {background_style: @background_style}
22
+ end
23
+
24
+ def edit
25
+ render partial: 'form', locals: {background_style: @background_style}
26
+ end
27
+
28
+ def update
29
+ @background_style.update_attributes(background_style_params)
30
+ if @background_style.errors.empty?
31
+ render partial: 'show', locals: {background_style: @background_style}
32
+ else
33
+ render partial: 'form', locals: {background_style: @background_style}, status: 409
34
+ end
35
+ end
36
+
37
+ def destroy
38
+ @background_style.destroy
39
+ head :ok
40
+ end
41
+
42
+ protected
43
+
44
+ def get_background_style
45
+ @background_style = Pulitzer::BackgroundStyle.find(params[:id])
46
+ end
47
+
48
+ def background_style_params
49
+ params[:background_style].permit!
50
+ end
51
+
52
+ end
@@ -1,5 +1,5 @@
1
1
  class Pulitzer::ContentElementsController < Pulitzer::ApplicationController
2
- before_filter :set_content_element, only: [:show, :edit, :update]
2
+ before_action :set_content_element, only: [:show, :edit, :update]
3
3
 
4
4
  def show
5
5
  render partial: 'show', locals: { content_element: @content_element }
@@ -20,7 +20,7 @@ class Pulitzer::ContentElementsController < Pulitzer::ApplicationController
20
20
  new_sort_order = params[:content_element].index(ce.id.to_s)
21
21
  ce.update_attribute(:sort_order, new_sort_order)
22
22
  end
23
- render nothing: true
23
+ head :ok
24
24
  end
25
25
 
26
26
  protected
@@ -1,5 +1,5 @@
1
1
  class Pulitzer::FreeFormSectionTypesController < Pulitzer::ApplicationController
2
- before_filter :get_ffst, only: [:show, :edit, :update, :destroy]
2
+ before_action :get_ffst, only: [:show, :edit, :update, :destroy]
3
3
 
4
4
  def new
5
5
  @post_type = Pulitzer::PostType.find(params[:post_type_id])
@@ -32,7 +32,7 @@ class Pulitzer::FreeFormSectionTypesController < Pulitzer::ApplicationController
32
32
  def destroy
33
33
  @ffst.destroy
34
34
  Pulitzer::DestroyPostTypeFreeFormSections.new(@ffst).call
35
- render nothing: true
35
+ head :ok
36
36
  end
37
37
 
38
38
  protected
@@ -0,0 +1,52 @@
1
+ class Pulitzer::JustificationStylesController < Pulitzer::ApplicationController
2
+ before_action :get_justification_style, only: [:show, :edit, :update, :destroy]
3
+
4
+ def new
5
+ @justification_style = Pulitzer::JustificationStyle.new(justification_style_params)
6
+ @post_type = @justification_style.post_type
7
+ render partial: 'new', locals: {justification_style: @justification_style}
8
+ end
9
+
10
+ def create
11
+ @justification_style = Pulitzer::JustificationStyle.create(justification_style_params)
12
+ if @justification_style.errors.empty?
13
+ render partial: 'show_wrapper', locals: {justification_style: @justification_style}
14
+ else
15
+ @post_type = @justification_style.post_type
16
+ render partial: 'new', locals: {justification_style: @justification_style}
17
+ end
18
+ end
19
+
20
+ def show
21
+ render partial: 'show', locals: {justification_style: @justification_style}
22
+ end
23
+
24
+ def edit
25
+ render partial: 'form', locals: {justification_style: @justification_style}
26
+ end
27
+
28
+ def update
29
+ @justification_style.update_attributes(justification_style_params)
30
+ if @justification_style.errors.empty?
31
+ render partial: 'show', locals: {justification_style: @justification_style}
32
+ else
33
+ render partial: 'form', locals: {justification_style: @justification_style}, status: 409
34
+ end
35
+ end
36
+
37
+ def destroy
38
+ @justification_style.destroy
39
+ head :ok
40
+ end
41
+
42
+ protected
43
+
44
+ def get_justification_style
45
+ @justification_style = Pulitzer::JustificationStyle.find(params[:id])
46
+ end
47
+
48
+ def justification_style_params
49
+ params[:justification_style].permit!
50
+ end
51
+
52
+ end
@@ -1,5 +1,5 @@
1
1
  class Pulitzer::LayoutsController < Pulitzer::ApplicationController
2
- before_filter :get_layout, only: [:show, :edit, :update, :destroy]
2
+ before_action :get_layout, only: [:show, :edit, :update, :destroy]
3
3
 
4
4
  def new
5
5
  @layout = Pulitzer::Layout.new(layout_params)
@@ -27,7 +27,7 @@ class Pulitzer::LayoutsController < Pulitzer::ApplicationController
27
27
 
28
28
  def destroy
29
29
  @layout.destroy
30
- render nothing: true
30
+ head :ok
31
31
  end
32
32
 
33
33
  protected
@@ -1,5 +1,5 @@
1
1
  class Pulitzer::PartialTypesController < Pulitzer::ApplicationController
2
- before_filter :get_partial_type, only: [:show, :edit, :update, :destroy]
2
+ before_action :get_partial_type, only: [:show, :edit, :update, :destroy]
3
3
 
4
4
  def index
5
5
  @ffst = Pulitzer::FreeFormSectionType.find(params[:ffst_id])
@@ -1,5 +1,5 @@
1
1
  class Pulitzer::PartialsController < Pulitzer::ApplicationController
2
- before_filter :set_partial, except: [:new, :create, :update_all]
2
+ before_action :set_partial, except: [:new, :create, :update_all]
3
3
 
4
4
  def new
5
5
  @partial = Pulitzer::Partial.new(partial_params)
@@ -42,7 +42,7 @@ class Pulitzer::PartialsController < Pulitzer::ApplicationController
42
42
 
43
43
  def destroy
44
44
  @partial.destroy
45
- render nothing: true
45
+ head :ok
46
46
  end
47
47
 
48
48
  protected
@@ -1,5 +1,5 @@
1
1
  class Pulitzer::PostTagsController < Pulitzer::ApplicationController
2
- before_filter :get_post_tag, only: [:destroy]
2
+ before_action :get_post_tag, only: [:destroy]
3
3
 
4
4
  def new
5
5
  @tag_model = params[:tag_model]
@@ -15,7 +15,7 @@ class Pulitzer::PostTagsController < Pulitzer::ApplicationController
15
15
 
16
16
  def destroy
17
17
  @post_tag.destroy
18
- render nothing: true
18
+ head :ok
19
19
  end
20
20
 
21
21
  protected
@@ -1,5 +1,5 @@
1
1
  class Pulitzer::PostTypeContentElementTypesController < Pulitzer::ApplicationController
2
- before_filter :get_ptcet, only: [:show, :edit, :update, :destroy]
2
+ before_action :get_ptcet, only: [:show, :edit, :update, :destroy]
3
3
 
4
4
  def new
5
5
  @post_type = Pulitzer::PostType.find(params[:post_type_id])
@@ -32,7 +32,7 @@ class Pulitzer::PostTypeContentElementTypesController < Pulitzer::ApplicationCon
32
32
  def destroy
33
33
  @ptcet.destroy
34
34
  Pulitzer::DestroyPostTypeContentElements.new(@ptcet).call
35
- render nothing: true
35
+ head :ok
36
36
  end
37
37
 
38
38
  protected
@@ -1,5 +1,5 @@
1
1
  class Pulitzer::PostTypesController < Pulitzer::ApplicationController
2
- before_filter :get_post_type, except: [:index, :new, :create]
2
+ before_action :get_post_type, except: [:index, :new, :create]
3
3
 
4
4
  def index
5
5
  if params[:post_type_kind]
@@ -44,7 +44,7 @@ class Pulitzer::PostTypesController < Pulitzer::ApplicationController
44
44
 
45
45
  def destroy
46
46
  @post_type.destroy
47
- render nothing: true
47
+ head :ok
48
48
  end
49
49
 
50
50
  protected
@@ -1,5 +1,5 @@
1
1
  class Pulitzer::PostsController < Pulitzer::ApplicationController
2
- before_filter :get_post, only: [:show, :edit, :edit_title, :edit_slug, :show_slug, :update,
2
+ before_action :get_post, only: [:show, :edit, :edit_title, :edit_slug, :show_slug, :update,
3
3
  :update_slug, :processing_preview]
4
4
  before_action :get_version, only: [:edit_slug, :show_slug, :update_slug]
5
5
 
@@ -0,0 +1,52 @@
1
+ class Pulitzer::SequenceFlowStylesController < Pulitzer::ApplicationController
2
+ before_action :get_sequence_flow_style, only: [:show, :edit, :update, :destroy]
3
+
4
+ def new
5
+ @sequence_flow_style = Pulitzer::SequenceFlowStyle.new(sequence_flow_style_params)
6
+ @post_type = @sequence_flow_style.post_type
7
+ render partial: 'new', locals: {sequence_flow_style: @sequence_flow_style}
8
+ end
9
+
10
+ def create
11
+ @sequence_flow_style = Pulitzer::SequenceFlowStyle.create(sequence_flow_style_params)
12
+ if @sequence_flow_style.errors.empty?
13
+ render partial: 'show_wrapper', locals: {sequence_flow_style: @sequence_flow_style}
14
+ else
15
+ @post_type = @sequence_flow_style.post_type
16
+ render partial: 'new', locals: {sequence_flow_style: @sequence_flow_style}
17
+ end
18
+ end
19
+
20
+ def show
21
+ render partial: 'show', locals: {sequence_flow_style: @sequence_flow_style}
22
+ end
23
+
24
+ def edit
25
+ render partial: 'form', locals: {sequence_flow_style: @sequence_flow_style}
26
+ end
27
+
28
+ def update
29
+ @sequence_flow_style.update_attributes(sequence_flow_style_params)
30
+ if @sequence_flow_style.errors.empty?
31
+ render partial: 'show', locals: {sequence_flow_style: @sequence_flow_style}
32
+ else
33
+ render partial: 'form', locals: {sequence_flow_style: @sequence_flow_style}, status: 409
34
+ end
35
+ end
36
+
37
+ def destroy
38
+ @sequence_flow_style.destroy
39
+ head :ok
40
+ end
41
+
42
+ protected
43
+
44
+ def get_sequence_flow_style
45
+ @sequence_flow_style = Pulitzer::SequenceFlowStyle.find(params[:id])
46
+ end
47
+
48
+ def sequence_flow_style_params
49
+ params[:sequence_flow_style].permit!
50
+ end
51
+
52
+ end