dorsale 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,7 +15,7 @@ module Dorsale
15
15
  flash[:danger] = "Error : comment not saved."
16
16
  end
17
17
 
18
- redirect_to request.referrer || main_app.root_path
18
+ redirect_to params[:back_url] || request.referer || main_app.root_path
19
19
  end
20
20
 
21
21
  private
@@ -2,6 +2,12 @@
2
2
  = f.hidden_field :commentable_id, value: commentable.id.to_s
3
3
  = f.hidden_field :commentable_type, value: commentable.class.to_s
4
4
 
5
+ input.back_url type="hidden" name="back_url"
6
+ javascript:
7
+ $(document).ready(function(){
8
+ $("input.back_url").val(location.href)
9
+ })
10
+
5
11
  = f.input :text, label: false
6
12
 
7
13
  .center
@@ -1,3 +1,3 @@
1
1
  module Dorsale
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dorsale
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -226,7 +226,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
226
226
  version: '0'
227
227
  segments:
228
228
  - 0
229
- hash: 1002080367186324974
229
+ hash: 471634122639284413
230
230
  required_rubygems_version: !ruby/object:Gem::Requirement
231
231
  none: false
232
232
  requirements:
@@ -235,7 +235,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
235
235
  version: '0'
236
236
  segments:
237
237
  - 0
238
- hash: 1002080367186324974
238
+ hash: 471634122639284413
239
239
  requirements: []
240
240
  rubyforge_project:
241
241
  rubygems_version: 1.8.23.2