phcpress 0.2.1b → 0.3.1b
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/phcpress/blog/posts_controller.rb +3 -3
- data/app/controllers/phcpress/news/posts_controller.rb +3 -3
- data/app/views/phcpress/blog/posts/_form.html.erb +0 -12
- data/app/views/phcpress/blog/posts/index.html.erb +0 -2
- data/app/views/phcpress/blog/posts/show.html.erb +0 -2
- data/app/views/phcpress/news/posts/_form.html.erb +0 -12
- data/app/views/phcpress/news/posts/index.html.erb +0 -2
- data/app/views/phcpress/news/posts/show.html.erb +0 -2
- data/lib/phcpress/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4edb4f9a4c615837aa1a9cdde06a58c3c88702b
|
4
|
+
data.tar.gz: 0dad4cb7abd0700ab4723d816dd4c4e59184c64d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69a1b04e85f330c646ee22a4dd50c69bf82ef410a6dec849b72d9da76465d9af65220ba80ecc6b66f5ac76a710b1b7cfac7ab98d6bfcad60f5f6d11598ee5157
|
7
|
+
data.tar.gz: 5f98fa5b8170ba58f9610fb076415757bfb92870558dc2558d6dd45e7174c309285215f17813fbdb4f252a1116374d785e975118f7b8c54b66f9d71445dc858e
|
@@ -31,7 +31,7 @@ module Phcpress
|
|
31
31
|
@blog_post = Blog::Post.new(blog_post_params)
|
32
32
|
|
33
33
|
if @blog_post.save
|
34
|
-
redirect_to
|
34
|
+
redirect_to blog_posts_path, notice: 'Blog post was successfully created.'
|
35
35
|
else
|
36
36
|
render :new
|
37
37
|
end
|
@@ -40,7 +40,7 @@ module Phcpress
|
|
40
40
|
# PATCH/PUT
|
41
41
|
def update
|
42
42
|
if @blog_post.update(blog_post_params)
|
43
|
-
redirect_to
|
43
|
+
redirect_to blog_posts_path, notice: 'Blog post was successfully updated.'
|
44
44
|
else
|
45
45
|
render :edit
|
46
46
|
end
|
@@ -49,7 +49,7 @@ module Phcpress
|
|
49
49
|
# DELETE
|
50
50
|
def destroy
|
51
51
|
@blog_post.destroy
|
52
|
-
redirect_to
|
52
|
+
redirect_to blog_posts_path, notice: 'Blog post was successfully destroyed.'
|
53
53
|
end
|
54
54
|
|
55
55
|
private
|
@@ -31,7 +31,7 @@ module Phcpress
|
|
31
31
|
@news_post = News::Post.new(news_post_params)
|
32
32
|
|
33
33
|
if @news_post.save
|
34
|
-
redirect_to
|
34
|
+
redirect_to news_posts_path, notice: 'News post was successfully created.'
|
35
35
|
else
|
36
36
|
render :new
|
37
37
|
end
|
@@ -40,7 +40,7 @@ module Phcpress
|
|
40
40
|
# PATCH/PUT
|
41
41
|
def update
|
42
42
|
if @news_post.update(news_post_params)
|
43
|
-
redirect_to
|
43
|
+
redirect_to news_posts_path, notice: 'News post was successfully updated.'
|
44
44
|
else
|
45
45
|
render :edit
|
46
46
|
end
|
@@ -49,7 +49,7 @@ module Phcpress
|
|
49
49
|
# DELETE
|
50
50
|
def destroy
|
51
51
|
@news_post.destroy
|
52
|
-
redirect_to
|
52
|
+
redirect_to news_posts_path, notice: 'News post was successfully destroyed.'
|
53
53
|
end
|
54
54
|
|
55
55
|
private
|
@@ -1,17 +1,5 @@
|
|
1
1
|
<%= form_for(@blog_post) do |f| %>
|
2
2
|
|
3
|
-
<% if @blog_post.errors.any? %>
|
4
|
-
<div id="error_explanation">
|
5
|
-
<h2><%= pluralize(@blog_post.errors.count, "error") %> prohibited this blog_post from being saved:</h2>
|
6
|
-
|
7
|
-
<ul>
|
8
|
-
<% @blog_post.errors.full_messages.each do |message| %>
|
9
|
-
<li><%= message %></li>
|
10
|
-
<% end %>
|
11
|
-
</ul>
|
12
|
-
</div>
|
13
|
-
<% end %>
|
14
|
-
|
15
3
|
<div class="form-group">
|
16
4
|
<label><%= f.label :blogpsttitle, "Title" %></label>
|
17
5
|
<%= f.text_field :blogpsttitle, class: "form-control" %>
|
@@ -1,17 +1,5 @@
|
|
1
1
|
<%= form_for(@news_post) do |f| %>
|
2
2
|
|
3
|
-
<% if @news_post.errors.any? %>
|
4
|
-
<div id="error_explanation">
|
5
|
-
<h2><%= pluralize(@news_post.errors.count, "error") %> prohibited this news_post from being saved:</h2>
|
6
|
-
|
7
|
-
<ul>
|
8
|
-
<% @news_post.errors.full_messages.each do |message| %>
|
9
|
-
<li><%= message %></li>
|
10
|
-
<% end %>
|
11
|
-
</ul>
|
12
|
-
</div>
|
13
|
-
<% end %>
|
14
|
-
|
15
3
|
<div class="form-group">
|
16
4
|
<label><%= f.label :newspsttitle, "Post Name" %></label>
|
17
5
|
<%= f.text_field :newspsttitle, class: "form-control" %>
|
data/lib/phcpress/version.rb
CHANGED