simple_workflow 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.rdoc +7 -0
- data/README.rdoc +9 -1
- data/lib/simple_workflow.rb +4 -2
- data/lib/simple_workflow/version.rb +1 -1
- metadata +4 -4
data/History.rdoc
CHANGED
data/README.rdoc
CHANGED
@@ -10,11 +10,19 @@ Extension to Rails to allow detours with returns.
|
|
10
10
|
|
11
11
|
== FEATURES/PROBLEMS:
|
12
12
|
|
13
|
-
* switch your "link_to" lines to "detour_to" and your controller "redirect_to" to "back_or_redirect_to" to allow users
|
13
|
+
* switch your "link_to" lines to "detour_to" and your controller "redirect_to" to "back_or_redirect_to" to allow users
|
14
|
+
to return from whence they came.
|
14
15
|
|
15
16
|
== SYNOPSIS:
|
16
17
|
|
18
|
+
In views:
|
19
|
+
|
17
20
|
detour_to :controller => :my_models, :action => :create
|
21
|
+
back_or_link_to :controller => :welcome, :action => :index
|
22
|
+
image_button_to :controller => :my_models, :action => :create
|
23
|
+
|
24
|
+
In controllers:
|
25
|
+
|
18
26
|
back_or_redirect_to :controller => :my_models, :action => :index
|
19
27
|
|
20
28
|
In your tests:
|
data/lib/simple_workflow.rb
CHANGED
@@ -1,10 +1,12 @@
|
|
1
1
|
$:.unshift(File.dirname(__FILE__)) unless
|
2
2
|
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
|
3
3
|
|
4
|
+
require 'action_controller/base'
|
5
|
+
|
4
6
|
require 'simple_workflow/version'
|
5
7
|
require 'simple_workflow/helper'
|
6
8
|
require 'simple_workflow/controller'
|
7
|
-
require '
|
9
|
+
require 'simple_workflow/test_helper'
|
8
10
|
|
9
11
|
module ApplicationHelper
|
10
12
|
include SimpleWorkflow::Helper
|
@@ -17,5 +19,5 @@ class ActionController::Base
|
|
17
19
|
end
|
18
20
|
|
19
21
|
class ActiveSupport::TestCase
|
20
|
-
include SimpleWorkflow::
|
22
|
+
include SimpleWorkflow::TestHelper
|
21
23
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_workflow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 1
|
10
|
+
version: 0.3.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Uwe Kubosch
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-03-
|
18
|
+
date: 2012-03-21 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rails
|