effective_regions 1.2.0 → 1.2.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: 1402399f8ff72dbb00f4f7a8f8f0f95f1570b297
4
- data.tar.gz: 39358c292ded863b23e6bb76dd15aa505dce7c11
3
+ metadata.gz: 0c78dc9180e0b7a156b52b673f91fd017d04247f
4
+ data.tar.gz: a11f127759b7704cf71b358a558cafdaa66cb888
5
5
  SHA512:
6
- metadata.gz: 99f3d78308d78d3e0408b576e45553d81f67fc06de00dc25e2fe7df9b75414bd0e31d31cd0d3b00b518535ebc3d0f3d38ff9c4131e7e4928baf3fd3d88849306
7
- data.tar.gz: cb2d1b4a79be9bbd1e110be5595809ddea8e2e8428408a70888720a958619834d065a3235bc0cbc451237a8a4ae8a0632bfaeb79483adeb920654a0e3be97c4c
6
+ metadata.gz: 298e7224002ec5734308c98531fd58c51a3ce7cd5855226fb2f3aa63ca9e57c4f5f63aad66aa91eea0d6db25d9c979054e2c9c71b1ddbb45a527bdff5507d869
7
+ data.tar.gz: 79875c9df79a80b94ce30e0df31c19a15afc99c6d60d1b25d184d2b9651e6c1ca32ba5b53b84db49e72ffa02f188c3c554a1d4d8e0c1b6c04c2339d7365bb144
@@ -11,7 +11,7 @@ module Effective
11
11
  def edit
12
12
  EffectiveRegions.authorized?(self, :edit, Effective::Region.new())
13
13
 
14
- cookies['effective_regions_editting'] = {:value => request.referrer, :path => '/'}
14
+ cookies['effective_regions_editting'] = {:value => params[:exit].presence || request.referrer, :path => '/'}
15
15
 
16
16
  # TODO: turn this into a cookie or something better.
17
17
  redirect_to request.url.gsub('/edit', '') + '?edit=true'
@@ -67,7 +67,7 @@ module EffectiveRegionsHelper
67
67
  end
68
68
  end
69
69
 
70
- if effectively_editting? && can_edit # If we need the editable div
70
+ if effectively_editting? && (can_edit && options[:editable] != false) # If we need the editable div
71
71
  content_tag(editable_tag, opts) do
72
72
  region.try(:content).present? ? render_region(region, true) : ((capture(&block).strip.html_safe) if block_given?)
73
73
  end
@@ -1,3 +1,3 @@
1
1
  module EffectiveRegions
2
- VERSION = '1.2.0'
2
+ VERSION = '1.2.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_regions
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-14 00:00:00.000000000 Z
11
+ date: 2015-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails