I ran into some problems with my code and I don't know how to fix it. So my problem:
On a View of my application, there is a filepath displayed like this:
If I understand your question right, then, maybe it should help you:
a = "/resume/attachment/12/yaml_error_complete.yml" a.split('/').last #=> "yaml_error_complete.yml"