rss

Rails flash messages helper

2

Category : Ruby on Rails

display_flash(:error) # to display a specific flash message
display_flash # to display all flash messages

1
2
3
4
5
6
7
8
9
10
11
12
13
# Methods added to this helper will be available to all templates in the application.
module ApplicationHelper
  FLASH_TYPES = [:error, :warning, :success, :message]
  def display_flash(type = nil)
    html = ""
    if type.nil?
      FLASH_TYPES.each { |name| html << display_flash(name) }
    else
      return flash[type].blank? ? "" : "#{flash[type]}"
    end
    html
  end
end
  • Share/Bookmark

3D Flash Image Viewer: TiltViewer

1

Category : Design, Flash

 

TiltViewer is a free 3D Flash image viewer application with an impressive interface.

The application responds to the mouse movements and creates a full 3D effect with new image sets falling, old ones disappearing, zooming an image and flipping it to see the details.

Tiltviewer
Tiltviewer

Tiltviewer

Images can be added to the gallery from a XML file or a flickr account.

Reblog this post [with Zemanta]
  • Share/Bookmark

Amit Yadav is Digg proof thanks to caching by WP Super Cache