mini_blog 0.1.0 → 0.1.1

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
  SHA1:
3
- metadata.gz: d228563f2da2e3c951926d730c171d870b9ecaf0
4
- data.tar.gz: a5297225f2ec1edc0bdbf9e0f4fc8ccf57c40614
3
+ metadata.gz: 4f1ff2cae81619fae64a7332e042946b99d1b8cc
4
+ data.tar.gz: 6f306492c64b53304069020ed54413cdfd3f8928
5
5
  SHA512:
6
- metadata.gz: 10054f38b98aedfb7595dab1cfb91593070b1ab3aeb8d4ddc491b689297e04f4831a79248bfb48ff09719034451188b0bd476a915a5dfbf5a521104e95c53148
7
- data.tar.gz: e9a4f73a0036611d02f25ae940631902c320df7c920bc2ad78e9650fd225936df55534f00a92058df7da274a16489531967fa1cd6f9e81fd5f60007e4a6bbdf9
6
+ metadata.gz: d5e953a53efe9cd560ac85f444d20684590c84b0b82f6b9ec545c97a782e2c6099fb56552ce46a0601bb105580bbe6e993b6db828340de3ad1b675e765dc12e9
7
+ data.tar.gz: ccc8b85afdfe847e893520223aa1c37837ee342696bc34aa713c7994d32c6c23aca173f39a2f800d74fe4c23e763ecc705435df028c7190d92bdddb7ea9b0df6
data/README.md CHANGED
@@ -24,7 +24,7 @@ $ gem install mini_blog
24
24
  To create user, in `seeds.rb`.And `rails db:seed`
25
25
 
26
26
  ```rb:seeds.rb
27
- User.create(email: 'yours@example.com', password: 'password', name: 'name')
27
+ MiniBlog::User.create(email: 'yours@example.com', password: 'password', name: 'name')
28
28
  ```
29
29
 
30
30
  ## Contributing
@@ -45,7 +45,7 @@ module MiniBlog
45
45
 
46
46
  article.destroy
47
47
 
48
- head :accepted
48
+ redirect_to root_path
49
49
  end
50
50
 
51
51
  private
@@ -8,6 +8,12 @@ ul
8
8
  - article.tags.each do |tag|
9
9
  li.badge.badge-dark.tag
10
10
  = tag.name
11
+ - if user_signed_in?
12
+ ul.btn-group style="list-style-type: none"
13
+ li
14
+ = link_to 'Edit', [:edit, article], class: 'btn btn-info'
15
+ li
16
+ = link_to 'Destroy', article, method: :delete, data: {confirm: 'detele this?'}, class: 'btn btn-danger'
11
17
  article.article.card-body.collapse*{id: "article-#{article.id}", 'data-id': article.id}
12
18
  button.btn.btn-link.btn-sm.text-left data-toggle="collapse" href="#article-#{article.id}" role="button" aria-expanded="false" aria-controls="article-#{article.id}"
13
19
  | open...
@@ -1,3 +1,3 @@
1
1
  {
2
- body: @article.body
2
+ body: Redcarpet::Markdown.new(Redcarpet::Render::HTML, autolink: true, tables: true, underline: true, highlight: true).render(@article.body)
3
3
  }.to_json
@@ -5,6 +5,7 @@ require 'slim-rails'
5
5
  require 'kaminari'
6
6
  require 'jquery-rails'
7
7
  require 'bootstrap'
8
+ require 'redcarpet'
8
9
 
9
10
  module MiniBlog
10
11
  # Your code goes here...
@@ -1,3 +1,3 @@
1
1
  module MiniBlog
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mini_blog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takumu Uyama
@@ -108,6 +108,20 @@ dependencies:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: 4.0.0
111
+ - !ruby/object:Gem::Dependency
112
+ name: redcarpet
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: mysql2
113
127
  requirement: !ruby/object:Gem::Requirement