rm encoding stuff

This commit is contained in:
Espen Antonsen 2009-08-01 19:53:20 +02:00
parent 0afb53fd20
commit 38c11ec272
2 changed files with 3 additions and 2 deletions

View file

@ -47,7 +47,8 @@ class AlbumsController < ApplicationController
@album = Album.new(params[:album])
@album.path = @album.title
if @album.save
if params[:collection_id]
unless params[:collection_id].empty?
puts "has params"
@album.collections << Collection.find( params[:collection_id] )
end
flash[:notice] = "Album created!"

View file

@ -92,7 +92,7 @@ class Album < ActiveRecord::Base
def create_folders
Dir.mkdir( APP_CONFIG[:photos_path] + self.path ) unless File.exists?( APP_CONFIG[:photos_path] + self.path )
Dir.mkdir( APP_CONFIG[:thumbs_path] + self.path ) unless File.exists?( APP_CONFIG[:thumbs_path] + self.path )
Dir.mkdir( APP_CONFIG[:thumbs_path] + self.path.encode("ASCII-8BIT") ) unless File.exists?( APP_CONFIG[:thumbs_path] + self.path )
end
def destroy_folders