문제

can I rename the columns with attachment_fu ?

I am using oracle as my database and size is keyword in oracle. so i don't want to create a column with size name. So is it ok to create a column with filesize instead of size while using attachment_fu ??

도움이 되었습니까?

해결책

If you are using filesize, just add the following method to the class having the attachment.

  def size 
    self.filesize 
  end

  def size=(bytes) 
    self.filesize = bytes 
  end

which should solve your problem , without hacking into attachment_fu.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top