Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use predictable column names for content #391

Open
wioux opened this issue Dec 21, 2017 · 0 comments
Open

Use predictable column names for content #391

wioux opened this issue Dec 21, 2017 · 0 comments

Comments

@wioux
Copy link
Member

wioux commented Dec 21, 2017

ContentHelper#preview is getting a little complex in how it finds a piece of content's html:

if object.respond_to?(:summary?) && object.summary?
html = object.summary
elsif object.respond_to?(:body)
html = object.body
else
html = object.description
end

Currently articles, blog_posts, lessons, and managed_content use "body" as their main text field, while materials, topics, and uploads use "description". In addition, articles has a "summary" field that the rest lack. It would be nice if we migrated these tables so they all use the same name for this kind of column.

@wioux wioux changed the title Normalize content structure Use predictable column names for content Dec 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant