좀 낭비스럽고 루비답지 않아보이지만.. 그냥 공개해보면..
[code ruby]
def created
s = read_attribute(:a_created).strftime("%y-%m-%d")
end
def created_long
s = read_attribute(:a_created).strftime("%Y-%m-%d %H:%M:%S")
end
def created_medium
s = read_attribute(:a_created).strftime("%y-%m-%d %H:%M")
end
[/code]
전에는 코딩하면서 꽤 정성을 쏟아부었던 것 같은데, 갈수록 시간을 투자하기가 싫어져버렸다. 그래도 요즘 다시 불타올라 보는중.. ㅎㅎ
[code ruby]
def created
s = read_attribute(:a_created).strftime("%y-%m-%d")
end
def created_long
s = read_attribute(:a_created).strftime("%Y-%m-%d %H:%M:%S")
end
def created_medium
s = read_attribute(:a_created).strftime("%y-%m-%d %H:%M")
end
[/code]
전에는 코딩하면서 꽤 정성을 쏟아부었던 것 같은데, 갈수록 시간을 투자하기가 싫어져버렸다. 그래도 요즘 다시 불타올라 보는중.. ㅎㅎ