markdown-rails 2.0.0.alpha7 → 2.0.0.alpha9

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: 9dde98979d1982cf68293e37a1567a937c3dca92d16476ff4049e5e69dfa8357
4
- data.tar.gz: 6fbd6128db8e456919bddacc8abc2127cf870d686b454aac21a9406a87a99bfa
3
+ metadata.gz: 2b43dcc40c9f348cff27e3f16d95f312b62e5673f71bb81cbc7a8c1a7e8b4f00
4
+ data.tar.gz: bf617fefac5972001e04424518b61dd93300c678d68ba30a5e2d9f19dc9474ab
5
5
  SHA512:
6
- metadata.gz: eee1a1518de503366398b312b663a654d0c6aa020af1cc9742367abee6fb09852660e209a32358ba6303f0941b91a857a930fbba0127c31740f724a137e3009c
7
- data.tar.gz: e327ca2a2ca733cc0f0e3247cc81dedea827d917fa544e667ce6068b9e7bcb26a8c0dff48c80dd79183b1d38d48e014a159cb7a80bf15b95cd1929a84b58afac
6
+ metadata.gz: e4b4d6fd8264ab7fcf10346bcecd35d3e45b8cb05be2285a7118e9f1415f9ce50ae1835395e38d9777d97ef68bd31c82186e14611dacf3271aa95804efa691e1
7
+ data.tar.gz: 37cc570911399969cdcfb03e4e39ffb8d596e94b4c72b35f2ea20a2cfeb013fee7d8d7079e3749dfdaed2b4cbd2d4749d0fcc5419e0754c2a46df54cea9e7535
@@ -1,3 +1,5 @@
1
+ require "redcarpet"
2
+
1
3
  module MarkdownRails
2
4
  module Renderer
3
5
  class Base < Redcarpet::Render::HTML
@@ -3,6 +3,14 @@ module MarkdownRails
3
3
  class Rails < Base
4
4
  include ::Rails.application.routes.url_helpers
5
5
 
6
+ # Rendering from Markdown is actually outside of the view
7
+ # context, so we need to delegate render to the ApplicationController
8
+ # render method that can render outside of the view context.
9
+ delegate \
10
+ :helpers,
11
+ :render,
12
+ to: :base_controller
13
+
6
14
  delegate \
7
15
  :asset_digest_path,
8
16
  :asset_path,
@@ -20,7 +28,6 @@ module MarkdownRails
20
28
  :video_url,
21
29
  :tag,
22
30
  :content_tag,
23
- :render,
24
31
  :request,
25
32
  :turbo_frame_tag,
26
33
  :controller,
@@ -32,8 +39,8 @@ module MarkdownRails
32
39
  end
33
40
 
34
41
  protected
35
- def helpers
36
- ::ActionController::Base.helpers
42
+ def base_controller
43
+ ::ApplicationController
37
44
  end
38
45
  end
39
46
  end
@@ -1,3 +1,3 @@
1
1
  module MarkdownRails
2
- VERSION = "2.0.0.alpha7"
2
+ VERSION = "2.0.0.alpha9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markdown-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.alpha7
4
+ version: 2.0.0.alpha9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brad Gessler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-04 00:00:00.000000000 Z
11
+ date: 2022-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails