jinda 0.5.7 → 0.5.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c9ccb1a4e45e53213b02caa625662e84ccd386d446509fef479f183f8a2aa3b9
4
- data.tar.gz: f0efd2ac4630d6a145510969de1d361a28d3c376179649b906bb3f6f9e5b46b9
3
+ metadata.gz: 5437584419d20b8bf830bee5b254f52d79da72b0c7a63e4cff973a7c10156394
4
+ data.tar.gz: ec3d5a1838787b031e5072fb682b39a592edec96efabf8d3760327a4f832fb27
5
5
  SHA512:
6
- metadata.gz: a2fbe028c4cd8b129c70b35c908479ca9aec7b0d0389256a1e423eb81315b8c07728ac8dc5a81d469114f2eb9e6380c39420d35202247b878bc690cda832d8d2
7
- data.tar.gz: 84ef6f473657779def3fdfe49dfbfdb08f386d79028d3cffb5d3896ae06d864185b6ddb949e695a0deb1162fcae7f40ffa353b289f67cc6d2320c532a0f5b88a
6
+ metadata.gz: 332c30c673a0107c09994ba8c394751789a018d9957adac57839413d86f8dea0f306714f435afeb22d0c9a6e6b34e8278be6f1306c096824e422ef9605a8052c
7
+ data.tar.gz: 110fb30d49712728b1988754995712612dd1c820c79f829c571fb89e02466fa37d7d300b72276355f2a47e8d0c537474bc24dbddefc5902be7a5002fb761943b
data/README.md CHANGED
@@ -40,7 +40,7 @@ app without ActiveRecord
40
40
 
41
41
  ## Add jinda to your Gemfile:
42
42
 
43
- gem 'jinda', '~> 0.5.7'
43
+ gem 'jinda', '~> 0.5.8'
44
44
 
45
45
  For Development (most updated)
46
46
 
@@ -118,8 +118,9 @@ module Jinda
118
118
  route "get '/docs/my/destroy' => 'docs#destroy'"
119
119
  route "get '/notes/my' => 'notes/my'"
120
120
  route "get '/docs/my' => 'docs/my'"
121
- route "get '/articles/my/destroy' => 'articles#destroy'"
121
+ route "get '/articles/edit' => 'articles/edit'"
122
122
  route "get '/articles/show' => 'articles/show'"
123
+ route "get '/articles/my/destroy' => 'articles#destroy'"
123
124
  route "get '/articles/my' => 'articles#my'"
124
125
  route "get '/logout' => 'sessions#destroy', :as => 'logout'"
125
126
  route "get '/auth/failure' => 'sessions#destroy'"
@@ -1,7 +1,7 @@
1
1
  class ArticlesController < ApplicationController
2
2
  before_action :load_articles, except: [:destroy]
3
3
  before_action :load_my_articles, only: [:my]
4
- before_action :load_article, only: [:destroy, :update]
4
+ before_action :load_article, only: [:destroy, :edit]
5
5
 
6
6
  def index
7
7
  # before_action
@@ -34,13 +34,15 @@ class ArticlesController < ApplicationController
34
34
  @article.save!
35
35
  end
36
36
 
37
- def my_update
38
- # before_action
39
- @article.update(title: $xvars["edit_article"]["article"]["title"],
40
- text: $xvars["edit_article"]["article"]["text"],
41
- keywords: $xvars["edit_article"]["article"]["keywords"],
42
- body: $xvars["edit_article"]["article"]["body"]
37
+ def update
38
+ @article = Article.find(params[:id])
39
+ @article.update(
40
+ title: params["article"]["title"],
41
+ text: params["article"]["text"],
42
+ keywords: params["article"]["keywords"],
43
+ body: params["article"]["body"]
43
44
  )
45
+ redirect_to :action=> 'show', :article_id => @article.id
44
46
  end
45
47
 
46
48
  def j_update
@@ -1,12 +1,12 @@
1
1
 
2
- %h1= @article.title
3
- %h1= title 'Member Login'
2
+ %h1= @page_title
4
3
  .content= @article.text
5
- %div= markdown(@article.body)
6
4
 
7
- = form_for @article, url: "/jinda/init?s=articles:edit_article" do |f|
5
+ = form_for @article, :article_id => @article.id do |f|
8
6
  = f.label :title, "Title"
9
- = f.text_field :title
7
+ = f.text_field :title, :required => true
8
+ = f.label :text, "Description"
9
+ = f.text_field :text, :required => true
10
10
  = f.label :body, "Body Content"
11
- = f.cktext_area :body, rows: 10
12
- = f.submit
11
+ = f.text_area :body, rows: 10
12
+ = f.submit
@@ -2,12 +2,12 @@
2
2
  - description @article.text
3
3
  - keywords @article.keywords
4
4
 
5
+ = link_to image_tag('pencil.png', style:'border:none; float:right;', id: 'article_pen'), {controller: "articles", action: "edit", article_id: @article.id}, data: { confirm: "Please Confirm" }
5
6
  %div{"data-role" => "menu_mm", "data-theme" => "b", "data-backbtn"=>"false"}
6
7
  #article-title= @article.title
7
8
 
8
9
  #article-text= @article.body.html_safe
9
10
 
10
- = link_to image_tag('pencil.png', style:'border:none; float:none;'), {controller: "comments", action: "create", article_id: @article.id}, data: { confirm: "Please Confirm" }
11
11
  - @comments.each do |comment|
12
12
  %div#article-comment.ui-corner-all
13
13
  Author:
@@ -21,7 +21,7 @@
21
21
 
22
22
  %h2 Installation
23
23
  %ul
24
- %li add gem 'jinda', '0.5.7'
24
+ %li add gem 'jinda', '0.5.8'
25
25
  %li bundle
26
26
  %li rails generate jinda:install
27
27
  %li (run all with "sh install.sh" )
@@ -1,10 +1,10 @@
1
1
  <head>
2
2
  <%= favicon_link_tag %>
3
- <%= csrf_meta_tags %>
4
- <%= meta_tags %>
5
3
  <meta name="description" content="Jinda" />
6
4
  <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track":"reload" %>
7
5
  <%= javascript_include_tag "application", "data-turbolinks-track": "reload" %>
8
6
  <%= stylesheet_link_tag "jinda", "sarabun" %>
9
7
  <script src = "https://ajax.aspnetcdn.com/ajax/jquery.validate/1.12.0/jquery.validate.js" ></script>
8
+ <%= csrf_meta_tags %>
9
+ <%= display_meta_tags %>
10
10
  </head>
@@ -1,3 +1,3 @@
1
1
  module Jinda
2
- VERSION = "0.5.7"
2
+ VERSION = "0.5.8"
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.5.7
4
+ version: 0.5.8
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: 2020-06-28 00:00:00.000000000 Z
12
+ date: 2020-07-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler