Module: HandyControllerHelpers::FlashHelpers
- Included in:
- AllHelpers
- Defined in:
- lib/handy_controller_helpers/flash_helpers.rb
Instance Method Summary collapse
- #flash_created? ⇒ Boolean
- #flash_destroyed? ⇒ Boolean
- #flash_recovered? ⇒ Boolean
- #flash_unauthorized? ⇒ Boolean
- #flash_updated? ⇒ Boolean
Instance Method Details
#flash_created? ⇒ Boolean
12 13 14 |
# File 'lib/handy_controller_helpers/flash_helpers.rb', line 12 def flash_created? flash[:notice].should =~ /was successfully created/i end |
#flash_destroyed? ⇒ Boolean
16 17 18 |
# File 'lib/handy_controller_helpers/flash_helpers.rb', line 16 def flash_destroyed? flash[:notice].should =~ /was successfully destroyed/i end |
#flash_recovered? ⇒ Boolean
20 21 22 |
# File 'lib/handy_controller_helpers/flash_helpers.rb', line 20 def flash_recovered? flash[:notice].should =~ /was successfully recovered/i end |
#flash_unauthorized? ⇒ Boolean
4 5 6 |
# File 'lib/handy_controller_helpers/flash_helpers.rb', line 4 def flash[:alert].should =~ /You are not authorized to access this page/i end |
#flash_updated? ⇒ Boolean
8 9 10 |
# File 'lib/handy_controller_helpers/flash_helpers.rb', line 8 def flash_updated? flash[:notice].should =~ /was successfully updated/i end |