README.md in stair_master-0.0.3 vs README.md in stair_master-0.1.0
- old
+ new
@@ -41,25 +41,24 @@
The named route for the path of this step.
**conditions** :hash
-Define the conditions that are to be used when resolving which steps will be available, and/or should be skipped based on the current context. Available conditions are:
+Define the conditions that are to be used when resolving which steps will be available, and/or should be skipped based on the current context. Available conditions are:
-- available_if/unless
- skip_if/unless
**Note** we recommend placing your maps in `app/maps` however you can place them where ever you would like.
```ruby
# app/maps/my_process_map.rb
#
class MyProcessMap < StairMaster::WorkflowMap
# We must override the define_map! method with our mapping rules
- add_step :home, "First Step", :first_step_path, available_if: :method_name
+ add_step :home, "First Step", :first_step_path, skip_if: :method_name
...
-
+
set_order :home, ...
end
```
#### Controllers
@@ -70,11 +69,11 @@
# app/controllers/my_process/base_controller.rb
#
class MyProcess::BaseController < ApplicationController
# Include the stair master controller concern
include StairMaster::Controller
-
+
# Tell stair master what map to use
stair_master_map_class MyProcessMap
end
```
@@ -83,10 +82,10 @@
# app/controllers/my_process/home_controller.rb
#
class MyProcess::HomeController < MyProcess::BaseController
def show
end
-
+
def update
end
end
```