aguids-publishable 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.5
1
+ 0.1.6
@@ -17,23 +17,23 @@ module PublicationsHelper
17
17
  unpublish_path(resource, options.merge({ :only_path => false }))
18
18
  end
19
19
 
20
- def publication_links(resource)
20
+ def publication_links(resource, options = {})
21
21
  tag = '<ul class="publication_links">'
22
22
  if resource.unpublished?
23
- tag << "<li>" << link_to(I18n.t('publications.publish', :default => 'Publish'), publish_path(resource)) << "</li>"
23
+ tag << "<li>" << link_to(I18n.t('publications.publish', :default => 'Publish'), publish_path(resource, options)) << "</li>"
24
24
  tag << '<li class="unpublish_disabled">' << I18n.t('publications.unpublish', :default => 'Unpublish') << '</li>'
25
25
  else
26
26
  tag << '<li class="publish_disabled">' << I18n.t('publications.publish', :default => 'Publish') << '</li>'
27
- tag << "<li>" << link_to(I18n.t('publications.unpublish', :default => 'Unpublish'), unpublish_path(resource)) << "</li>"
27
+ tag << "<li>" << link_to(I18n.t('publications.unpublish', :default => 'Unpublish'), unpublish_path(resource, options)) << "</li>"
28
28
  end
29
29
  tag
30
30
  end
31
31
 
32
- def publication_link(resource)
32
+ def publication_link(resource, options = {})
33
33
  if resource.unpublished?
34
- link_to I18n.t('publications.publish', :default => 'Publish'), publish_path(resource), :method => :post
34
+ link_to I18n.t('publications.publish', :default => 'Publish'), publish_path(resource, options), :method => :post
35
35
  else
36
- link_to I18n.t('publications.unpublish', :default => 'Unpublish'), unpublish_path(resource), :method => :delete
36
+ link_to I18n.t('publications.unpublish', :default => 'Unpublish'), unpublish_path(resource, options), :method => :delete
37
37
  end
38
38
  end
39
39
  end
data/publishable.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{publishable}
5
- s.version = "0.1.5"
5
+ s.version = "0.1.6"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Felipe Doria"]
9
- s.date = %q{2009-08-08}
9
+ s.date = %q{2009-09-17}
10
10
  s.email = %q{felipe.doria@gmail.com}
11
11
  s.extra_rdoc_files = [
12
12
  "LICENSE",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aguids-publishable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felipe Doria
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-08-08 00:00:00 -07:00
12
+ date: 2009-09-17 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency