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: 1885ed25b58539f5e6773fe4a0dd08bab63875991d8daec8dc5bd7bf971a3ede
4
- data.tar.gz: b9659cedc949e4b78e1b797f432fedbd5157a14289992747efa70a66bb2dfea9
3
+ metadata.gz: 48ce5777a5487d4ce6306e23e4a2282942f46198d55e23eb520cc09ae9c996f3
4
+ data.tar.gz: 12955222fdebd6e0aa61f3d56c83714547dda3e1cf58e11e2fde79d6a2cf2049
5
5
  SHA512:
6
- metadata.gz: d688085b44c9caf3a91506ea7c6c72b9ae9b332940e0281f0653f7271a8e43aac381e4793cabb688a4247e29334cf8e28f495eb50fdcee00b77a7e2105eb19ed
7
- data.tar.gz: 23542a57b4496855c435a31ef33901dbac71dceb681cc370299af64eb37e49dc3be72ce9619a191a9f0b74653f07abdb98ca4a0430cfe3319f8db0fadf9dbda1
6
+ metadata.gz: 7f65564cebf1cb8ecae7ebf858fafb02183c627ba368c07fcfe4ca19f37ec0450f282a8510f9a39ed360cee213e3d107fa4658e3d3eba7f2e450e2ae64816e63
7
+ data.tar.gz: 4a6b22373c3c37e296a77cd2e27729bb8edf456c0b96bccb13c6d93aea273133687a18be6fc1bb4c0329bb7da188bdbed1730bd065ef32bb5e76910d8335d4c2
data/README.md CHANGED
@@ -36,7 +36,7 @@ app without ActiveRecord
36
36
 
37
37
  ## Add jinda to your Gemfile:
38
38
 
39
- gem 'jinda', '~> 0.2.3'
39
+ gem 'jinda', '~> 0.2.4'
40
40
 
41
41
  For Development (most updated)
42
42
 
@@ -1,5 +1,6 @@
1
1
  class ArticlesController < ApplicationController
2
- before_action :load_article, only: [:show, :destroy]
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
- text: $xvars["edit_article"]["text"],
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 load_article
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
@@ -20,7 +20,7 @@
20
20
 
21
21
  %h2 Installation
22
22
  %ul
23
- %li add gem 'jinda', '0.2.3'
23
+ %li add gem 'jinda', '0.2.4'
24
24
  %li bundle
25
25
  %li rails generate jinda:install
26
26
  %li bundle
data/lib/jinda/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Jinda
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
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.3
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-09-30 00:00:00.000000000 Z
12
+ date: 2018-10-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler