enju_bookmark 0.1.2.pre8 → 0.1.2.pre9

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: 8c592ad67e5ecb09960cb7e9b0b5205a9fe4180f
4
- data.tar.gz: 5b60f8eeb7160dd50eab72abdb6548f05f97d9b0
3
+ metadata.gz: e7b5b27f32240372a6cd8a1d3da3bdf3dd5a293f
4
+ data.tar.gz: 926d0b6885702eec6a86ecceb6e51369ee6a63f6
5
5
  SHA512:
6
- metadata.gz: 223cb353a2a4e9ba0a077a0c30c8a04d4ad073386d5743b3bb5dd852ef00f7bab4fcfdcfc21aa90742edd9355aef4405e91733b5c6e67569e6f71489ff87fddc
7
- data.tar.gz: 67200049f968de0e221ad6af92f29c5d48fddc230eae21887a35c8ff06b14e844939685891f9849d416fab80682d59bb842f3bd415fc1125229e94ee1dfeb12e
6
+ metadata.gz: fa373de672bb8ab7887febd285f7a6b6f03385ba37e5febb7eaa7003726943698cdebfaaa66033d066fee2d8baaaf312dbc2a342476ace7d8da451a90151189d
7
+ data.tar.gz: 93eedd05e92f7c527a4256a0aebcc55f9b73f7894fe8dfd1bc6496edb503a0db11262f6da27e0d1e2edbaafadc818c55e2c86789fbb660977de846cc2b218be4
@@ -29,7 +29,7 @@ module EnjuBookmark
29
29
  false
30
30
  end
31
31
  end
32
- can [:update, :destroy], Bookmark do |bookmark|
32
+ can [:update, :destroy, :delete], Bookmark do |bookmark|
33
33
  bookmark.user == user
34
34
  end
35
35
  can :read, BookmarkStat
@@ -27,7 +27,7 @@
27
27
  </td>
28
28
  <td><%= l(bookmark.created_at) -%></td>
29
29
  <td>
30
- <%- if can? :destroy, bookmark -%>
30
+ <%- if can? :delete, bookmark -%>
31
31
  <%= link_to t('page.show'), bookmark_path(bookmark) -%>
32
32
  <%= link_to t('page.destroy'), bookmark_path(bookmark), :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
33
33
  <%- end -%>
@@ -30,7 +30,7 @@
30
30
  </td>
31
31
  <td><%= l(bookmark.created_at) -%></td>
32
32
  <td>
33
- <%- if can? :destroy, bookmark -%>
33
+ <%- if can? :delete, bookmark -%>
34
34
  <%= link_to t('page.destroy'), bookmark, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
35
35
  <%- end -%>
36
36
  </td>
@@ -2,7 +2,7 @@
2
2
  <%- if manifestation.tags -%>
3
3
  <%- manifestation.tags.each do |tag| -%>
4
4
  <%= link_to_tag(tag) -%>
5
- <%- if can? :destroy, tag -%>
5
+ <%- if can? :delete, tag -%>
6
6
  <%= link_to image_tag('icons/tag_blue_edit.png', :alt => t('page.edit')), tag_path(tag.name) -%>
7
7
  <%- end -%>
8
8
  <%- end -%>
@@ -9,11 +9,7 @@ module EnjuBookmark
9
9
  include InstanceMethods
10
10
  has_many :bookmarks, :include => :tags, :dependent => :destroy, :foreign_key => :manifestation_id
11
11
  has_many :users, :through => :bookmarks
12
- end
13
- end
14
12
 
15
- module InstanceMethods
16
- def owned_tags_by_solr
17
13
  searchable do
18
14
  string :tag, :multiple => true do
19
15
  tags.collect(&:name)
@@ -23,7 +19,9 @@ module EnjuBookmark
23
19
  end
24
20
  end
25
21
  end
22
+ end
26
23
 
24
+ module InstanceMethods
27
25
  def bookmarked?(user)
28
26
  return true if user.bookmarks.where(:url => url).first
29
27
  false
@@ -1,3 +1,3 @@
1
1
  module EnjuBookmark
2
- VERSION = "0.1.2.pre8"
2
+ VERSION = "0.1.2.pre9"
3
3
  end
@@ -29,7 +29,7 @@
29
29
  false
30
30
  end
31
31
  end
32
- can [:update, :destroy], Bookmark do |bookmark|
32
+ can [:update, :destroy, :delete], Bookmark do |bookmark|
33
33
  bookmark.user == user
34
34
  end
35
35
  can :read, BookmarkStat
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enju_bookmark
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2.pre8
4
+ version: 0.1.2.pre9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kosuke Tanabe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-03-13 00:00:00.000000000 Z
11
+ date: 2013-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -100,28 +100,28 @@ dependencies:
100
100
  requirements:
101
101
  - - ~>
102
102
  - !ruby/object:Gem::Version
103
- version: 0.1.0.pre22
103
+ version: 0.1.0.pre26
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - ~>
109
109
  - !ruby/object:Gem::Version
110
- version: 0.1.0.pre22
110
+ version: 0.1.0.pre26
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: enju_library
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ~>
116
116
  - !ruby/object:Gem::Version
117
- version: 0.1.0.pre11
117
+ version: 0.1.0.pre14
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - ~>
123
123
  - !ruby/object:Gem::Version
124
- version: 0.1.0.pre11
124
+ version: 0.1.0.pre14
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: sunspot_solr
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -405,7 +405,7 @@ files:
405
405
  - spec/dummy/solr/conf/stopwords.txt
406
406
  - spec/dummy/solr/conf/synonyms.txt
407
407
  - spec/dummy/solr/data/test/index/segments.gen
408
- - spec/dummy/solr/data/test/index/segments_bo
408
+ - spec/dummy/solr/data/test/index/segments_ca
409
409
  - spec/dummy/solr/data/test/spellchecker/segments.gen
410
410
  - spec/dummy/solr/data/test/spellchecker/segments_1
411
411
  - spec/factories/bookmark.rb
@@ -650,7 +650,7 @@ test_files:
650
650
  - spec/dummy/solr/conf/stopwords.txt
651
651
  - spec/dummy/solr/conf/synonyms.txt
652
652
  - spec/dummy/solr/data/test/index/segments.gen
653
- - spec/dummy/solr/data/test/index/segments_bo
653
+ - spec/dummy/solr/data/test/index/segments_ca
654
654
  - spec/dummy/solr/data/test/spellchecker/segments.gen
655
655
  - spec/dummy/solr/data/test/spellchecker/segments_1
656
656
  - spec/factories/bookmark.rb