molten-trunk/molten5_withgrid/app/helpers/application_helper.rb
# This method builds an image path based on a file +kind+.  If a +kind+ is not
# recognized +default+ is used instead.  +path_prefix+ is prepended to the
# path before it is returned.
This method builds an image path based on a file +kind+.  If a +kind+ is not
recognized +default+ is used instead.  +path_prefix+ is prepended to the
path before it is returned.
This method builds an image path based on a file + kind + . If a + kind + is not recognized + default + is used instead . + path_prefix + is prepended to the path before it is returned .
def file_kind_image_path( path_prefix, kind, default = "file.gif" )
    if File.exist? File.join( RAILS_ROOT, "public", "images",
                              path_prefix, kind.downcase + ".gif" )
      File.join(path_prefix, kind.downcase + ".gif")
    else
      File.join(path_prefix, default)
    end
  end
def file_kind_image_path ( path_prefix , kind , default = "file.gif" ) if File . exist? File . join ( RAILS_ROOT , "public" , "images" , path_prefix , kind . downcase + ".gif" ) File . join ( path_prefix , kind . downcase + ".gif" ) else File . join ( path_prefix , default ) end end
This method builds an image path based on a file +kind+.
This method builds an image path based on a file + kind + .
path_prefix
kind
default