Why is the path displayed instead of just the filename?


I’m trying to create a link to the file uploaded by file_column. In my
‘news’ table i have ‘attachment’ column that stores filenames of

But if i try to display the filename <%= @news.attachment %> i get
something like this:


In ‘attachment’ column i have only string ‘filename.ext’.

Any ideas?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs