Closed MattCowski closed 11 years ago
dynamically change text fields.
for example "7" if science_page_7.jpg.
def default_name self.name ||= File.basename(image.filename, '.*').titleize if image end
This code was in railscast. It takes file name i.e. "image_of_foo.jpg" and converts to "Image of Foo".
dynamically change text fields.
for example "7" if science_page_7.jpg.