restful_acl 3.1.3 → 3.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.1.3
1
+ 3.1.4
@@ -28,7 +28,7 @@ module RestfulAcl
28
28
  bits = @uri.split('/')
29
29
  parent_id = bits.at(bits.index(parent_klass.pluralize) + 1)
30
30
 
31
- parent_klass.classify.constantize.find(parent_id)
31
+ parent_klass.classify.constantize.find(parent_id.to_i)
32
32
  end
33
33
 
34
34
  def object_class
@@ -20,7 +20,7 @@ class UrlParser
20
20
  {:name => "parent_index", :controller_bit => 1, :object_id_bit => nil, :regex => /\/(\w+)$/}
21
21
  ]
22
22
 
23
- URL = /href="([\w\/-?$_.+!*'(),]+)"/
23
+ URL = /href="(.*?)"/
24
24
  NewURL = /\/new$/
25
25
  EditURL = /\/edit$/
26
26
  ObjectURL = /\/(\d+)[\w-]*$/
data/restful_acl.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{restful_acl}
8
- s.version = "3.1.3"
8
+ s.version = "3.1.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Matt Darby"]
12
- s.date = %q{2010-09-01}
12
+ s.date = %q{2010-11-22}
13
13
  s.description = %q{A Ruby on Rails plugin that provides fine grained access control to RESTful resources.}
14
14
  s.email = %q{matt@matt-darby.com}
15
15
  s.extra_rdoc_files = [
data/spec/spec_helper.rb CHANGED
@@ -9,18 +9,15 @@ require 'activesupport'
9
9
  Spec::Runner.configure do |config|
10
10
 
11
11
  def url(path)
12
- "<a href=\"#{path}\">#{path}</a>"
12
+ "<a href=\"#{path}\" target=\"_blank\" alt=\"foo\">#{path}</a>"
13
13
  end
14
14
 
15
15
  def destroy_url(path)
16
- "<a href=\"#{path}\" onclick=\"if (confirm('Are you sure?')) { var f = document.createElement('form');
17
- f.style.display = 'none'; this.parentNode.appendChild(f); f.method = 'POST'; f.action = this.href;
18
- var m = document.createElement('input'); m.setAttribute('type', 'hidden'); m.setAttribute('name', '_method');
19
- m.setAttribute('value', 'delete'); f.appendChild(m);f.submit(); };return false;\">Delete Image</a>"
16
+ "<a href=\"#{path}\" data-method=\"delete\">Delete Image</a>"
20
17
  end
21
18
 
22
19
  def ajax_url(path)
23
- "<a href=\"#\" onclick=\"if (confirm('Are you sure?')) { $.ajax({beforeSend:function(request){;}, complete:function(request){}, data:'_method=delete', dataType:'script', type:'post', url:'#{path}'}); }; return false;\"></a>"
20
+ "<a href=\"#{path}\" data-remote=\"true\">AJAX</a>"
24
21
  end
25
22
 
26
23
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restful_acl
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 11
5
5
  prerelease: false
6
6
  segments:
7
7
  - 3
8
8
  - 1
9
- - 3
10
- version: 3.1.3
9
+ - 4
10
+ version: 3.1.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matt Darby
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-01 00:00:00 -04:00
18
+ date: 2010-11-22 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency