0

I have the following:

      message = "uploaded the file.... "

I want to include the filename and link off to the file. currently I have:

      message = "uploaded the file #{  link_to "#{feed_item.feeded.file_file_name}", '/test'   }""

As you can see that's pretty messy. Is there a cleaner way to write this?

Thanks

1 Answer 1

2
message = "uploaded the file #{link_to(feed_item.feeded.file_file_name, '/test')}"

IMO the parens make it more readable when it's embedded like this.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.