aguids-publishable 0.1.4 → 0.1.5
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.
|
1
|
+
0.1.5
|
@@ -4,6 +4,8 @@ class PublicationsController < ApplicationController
|
|
4
4
|
def create
|
5
5
|
if unpublished_resource.publish!
|
6
6
|
flash[:notice] = I18n.t('flash.publications.create.notice', :default => "#{resource.class.human_name} published successfully")
|
7
|
+
else
|
8
|
+
flash[:resource] = resource
|
7
9
|
end
|
8
10
|
respond_to do |format|
|
9
11
|
format.html {redirect_to :back}
|
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
|
+
s.version = "0.1.5"
|
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-
|
9
|
+
s.date = %q{2009-08-08}
|
10
10
|
s.email = %q{felipe.doria@gmail.com}
|
11
11
|
s.extra_rdoc_files = [
|
12
12
|
"LICENSE",
|
@@ -55,10 +55,11 @@ class PublicationsControllerTest < ActionController::TestCase
|
|
55
55
|
assert !assigns(:resource).published?
|
56
56
|
end
|
57
57
|
|
58
|
-
test "create with unpublishable resource should
|
58
|
+
test "create with unpublishable resource should return the resource on the flash" do
|
59
59
|
@post = create_post
|
60
60
|
post :create, :resource => 'post', :id => @post.id
|
61
|
-
|
61
|
+
assert_not_nil flash[:resource]
|
62
|
+
assert_equal @post, flash[:resource]
|
62
63
|
end
|
63
64
|
|
64
65
|
test "create with published resource should raise an error" do
|
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.
|
4
|
+
version: 0.1.5
|
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-
|
12
|
+
date: 2009-08-08 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|