jinda 0.2.3 → 0.2.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
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 48ce5777a5487d4ce6306e23e4a2282942f46198d55e23eb520cc09ae9c996f3
|
|
4
|
+
data.tar.gz: 12955222fdebd6e0aa61f3d56c83714547dda3e1cf58e11e2fde79d6a2cf2049
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7f65564cebf1cb8ecae7ebf858fafb02183c627ba368c07fcfe4ca19f37ec0450f282a8510f9a39ed360cee213e3d107fa4658e3d3eba7f2e450e2ae64816e63
|
|
7
|
+
data.tar.gz: 4a6b22373c3c37e296a77cd2e27729bb8edf456c0b96bccb13c6d93aea273133687a18be6fc1bb4c0329bb7da188bdbed1730bd065ef32bb5e76910d8335d4c2
|
data/README.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
class ArticlesController < ApplicationController
|
|
2
|
-
before_action :load_article, only: [:show,
|
|
2
|
+
before_action :load_article, only: [:show,]
|
|
3
|
+
before_action :load_edit_article, only: [:edit, :destroy]
|
|
3
4
|
before_action :load_comments, only: [:show]
|
|
4
5
|
|
|
5
6
|
def index
|
|
@@ -25,19 +26,7 @@ class ArticlesController < ApplicationController
|
|
|
25
26
|
body: $xvars["form_article"]["body"],
|
|
26
27
|
user_id: $xvars["user_id"])
|
|
27
28
|
@article.save!
|
|
28
|
-
|
|
29
|
-
# comment out to use jinda_controller end_action
|
|
30
|
-
# redirect_to @article
|
|
31
|
-
# if @article.save!
|
|
32
|
-
# # format.html { redirect_to @article, notice: 'Sample was successfully created.' }
|
|
33
|
-
# format.html { redirect_to @article }
|
|
34
|
-
# format.json { render :show, status: :created, location: @article }
|
|
35
|
-
# end
|
|
36
|
-
# else
|
|
37
|
-
# format.html { render :new }
|
|
38
|
-
# format.json { render json: @article.errors, status: :unprocessable_entity }
|
|
39
|
-
# end
|
|
40
|
-
|
|
29
|
+
refresh_to
|
|
41
30
|
end
|
|
42
31
|
|
|
43
32
|
def my
|
|
@@ -53,12 +42,10 @@ class ArticlesController < ApplicationController
|
|
|
53
42
|
article_id = $xvars["select_article"] ? $xvars["select_article"]["title"] : $xvars["p"]["article_id"]
|
|
54
43
|
@article = Article.find(article_id)
|
|
55
44
|
@article.update(title: $xvars["edit_article"]["title"],
|
|
56
|
-
|
|
45
|
+
tenxt: $xvars["edit_article"]["text"],
|
|
57
46
|
keywords: $xvars["edit_article"]["keywords"],
|
|
58
47
|
body: $xvars["edit_article"]["body"]
|
|
59
48
|
)
|
|
60
|
-
# redirect_to @article
|
|
61
|
-
# comment out to use jinda_controller end_action
|
|
62
49
|
end
|
|
63
50
|
|
|
64
51
|
def destroy
|
|
@@ -79,9 +66,13 @@ class ArticlesController < ApplicationController
|
|
|
79
66
|
|
|
80
67
|
private
|
|
81
68
|
|
|
82
|
-
def
|
|
69
|
+
def load_edit_article
|
|
83
70
|
@article = Article.find(params.require(:article_id))
|
|
84
71
|
end
|
|
72
|
+
|
|
73
|
+
def load_article
|
|
74
|
+
@article = Article.find(params.permit(:id))
|
|
75
|
+
end
|
|
85
76
|
|
|
86
77
|
def load_comments
|
|
87
78
|
@comments = @article.comments.find_all
|
data/lib/jinda/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jinda
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Prateep Kul
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2018-
|
|
12
|
+
date: 2018-10-01 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: bundler
|