Kevin Dark
Kevin Dark

Reputation: 2149

Adding a blog to a rails 4 app

I'm working on building a personal site for myself and want to add a blog. I have followed a couple tutorials but those didn't really provide me with what I was looking for especially in terms of formatting post and adding images. Many of the similar questions I reviewed on this topic are dated and I was reviewing a number of Gems and they seem to not support rails 4.

I would greatly appreciate learning from this community the different ways all of you have gone about adding a blog to your apps/projects. If there is a related resource you can direct me to that would be a bonus.

Thank you in advance for any help you can provide.

Upvotes: 0

Views: 50

Answers (1)

Tom Prats
Tom Prats

Reputation: 7911

In terms of formatting a post. What you want is either a CMS or a WYSIWYG.

I recently used tinymce (which has a rails gem compatible with 4 but honestly you can just initialize it yourself with javascript). You just use a textarea field, say body, and initialize tinymce on it. Save it like a normal one and you're all set. Display it with <%raw @post.body %>

I don't like CMS's, they can be useful but it was a pain to use. A year ago I used ActiveAdmin with a plugin (I was already using ActiveAdmin so it made sense)

Upvotes: 1

Related Questions