Hi,
Say I have a model Event that has a file_column called ‘pdf’.
I want to send out emails that contain the URL for the pdf file that’s
associated with the Event. I also want to test the emails, so I’d
need to be able to get at the URL for the pdf inside my unit tests.
I don’t see how I can use url_for_file_column in this situation.
Doing <%= url_for_file_column “event”, “pdf” %> in the actionmailer
doesn’t seem to work (I get a error when it tried to do
nil.relative_url_root[1]). And I also don’t see how I can use
url_for_file_column in my unit tests.
Any ideas? Am I going about this completely wrong?
Thanks,
Joe
[1]
The error occured while evaluating nil.relative_url_root
#{RAILS_ROOT}/vendor/plugins/file_column/lib/file_column_helper.rb:53:in
`url_for_file_column’
#{RAILS_ROOT}/app/views/notifier_mailer/new_registration.rhtml:19