Putting a flash message into a method seems good to me.
Usually I have a helper method in my application_helper file that checks flash and diplays.
def show_flash
[:notice, :error, :warning].collect do |key|
content_tag(:div, flash[key], :id => key, :class => "flash flash_#{key}") unless flash[key].blank?
end.join
end
, , , , - , , , .
..
<% show_flash %>