Closed Phifo closed 10 years ago
Can you point to that image_id
here in the github? I don't see it in the master, 2-1-stable, 2-0-stable branches.
Well if I run in the rails console Refinery::News::Item
I got
=> Refinery::News::Item(id: integer, title: string, body: text, publish_date: datetime, created_at: datetime, updated_at: datetime, image_id: integer, expiration_date: datetime, source: string, slug: string)
There is an image_id attribute.
Looking at the migration folder I can see an add_image_id_to_news migration, but then there is a remove_image_id migration, so I guess that migration didn't run when I executed the rake db:migrate command.
On another topic, why remove image_id? In the index view I would like to show every news with an image related, so a image model relation is needed.
IIRC that image attribute was used exactly for what you described but we decided to remove it because this news extension is meant to be as a very simple implementation of news feed. Also it should be very easy to add the custom functionality yourself including this "cover image" functionality.
I can see there is an image_id attribute in the Item model, but I don't see its functionality. When I create a new news I can add an image to the body but there is no option to add an image to the Item model.