CultivateLabs / storytime

Storytime is a Rails 4+ CMS and blogging engine, with a core focus on content. It is built and maintained by @cultivatelabs
MIT License
752 stars 81 forks source link

Blog settings error #133

Closed dvanderbeek closed 9 years ago

dvanderbeek commented 9 years ago

When I run the dummy server and attempt to change the title of a blog from the blog settings menu, the response is a 422 error.

dvanderbeek commented 9 years ago

Looks like the error on the @blog record is that draft_content can't be blank. It looks like we have Blog inheriting from Page, which inherits from Post, which includes the has_versions concern. We probably need to switch up the way our models are set up to fix this.

dvanderbeek commented 9 years ago

Also, it appears this only happens for the default blog that gets created when you create a site. In the dashboard/blogs_controller there's a pretty dirty hack that just sets :draft_content to "test" on any other Blogs that get created, along with a few other attributes that really don't belong on a Blog record. I guess the easiest fix for now would be to do something similar for the default Blog.

eanlain commented 9 years ago

@dvanderbeek is this still an issue? I can't seem to reproduce...

dvanderbeek commented 9 years ago

Hmm, looks like it's working on the dummy app now. I'll close the issue and we can re-open it if we run into it again.