1 [tDiary] image.rb ã§ã³ã±ãããã«ãªã£ã ãã¡ã®ã¬ã³ã¿ã«ãµã¼ãã¯ã¡ããã¨ãã°ãåãã¦ãããªãã®ã§ããåãããªããã ãã©ãã©ãããimage_listã¡ã½ããã§æ»ãã§ãããããªã®ã§ããã¶ãã¡ã¢ãªä¸è¶³ã«ãªã£ã¦ããããªããã¨æ¨æ¸¬ã 1ãã¡ã¤ã«ã ããè¿ãã¡ã½ãããæ°ãã追å ããã def image_path(date, id) basic_path = "#{date}_#{id.to_s}." ["jpg", "png", "gif"].each do |ext| if File.exist? "#{@image_dir}/#{basic_path}#{ext}" return basic_path + ext end end end å¼ã³åºãã®ã¯ã以ä¸ã®ã¨ããã image_listã®ä»£ããã«image_pathã使ãã ãµã ãã¤ã«ï¼image_tï¼ã¯èªåã使ã£ã¦ãªãã®ã§
{{#tags}}- {{label}}
{{/tags}}