Created
August 26, 2011 02:25
-
-
Save kirkbushell/1172545 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# flash partial | |
- flash.each do |type,value| | |
- unless value.nil? | |
%div{:class => type.to_s} | |
%div | |
%span | |
= value | |
- unless object.nil? | |
%ul | |
- object.errors.full_messages.each do |msg| | |
%li | |
= msg | |
# when rendered from view | |
= render :partial => 'global/flash', :locals => {:flash => flash} | |
# and when a model is present | |
= render :partial => 'global/flash', :locals => {:flash => flash, :object => @model} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment