Association with table "attachments" in controller "Files"

Added by Evgeniy Barkovskiy about 11 years ago

Hello!
Right now I'm developing plugin that adds an extra tab for attaching files. I've had a couple of questions about Redmine:
How work association with table "attachments"? In controller "Files" there is :include :attachments line while model "Attachments" only :belongs_to :container. It seems that this ":container" somehow work with associations. Can you explain how?
I'm really confused, so any help will be appreciated!