Syosset / syosset

🖥️ The official website of Syosset High School from 2017-2019, powered by Rails 5.
https://web.archive.org/web/20190414065933/https://syosseths.com/
MIT License
9 stars 2 forks source link

Attachment uploads are broken with Promotions #110

Closed neiljohari closed 6 years ago

neiljohari commented 6 years ago

https://sentry.io/syosset/syossethscom/issues/456025498/

NameError: wrong constant name 
  app/controllers/attachments_controller.rb:12:in `get_attachable'
    @attachable = params[:attachable_type].classify.constantize.find(params[:attachable_id])
  app/controllers/application_controller.rb:65:in `set_current_user'
    yield
...
(69 additional frame(s) were not displayed)

NameError: wrong constant name 
neiljohari commented 6 years ago

I think the fix is just to include Concerns::Attachable in the Promotion model