سؤال

Is there a way to allow admins to modify the content of simple static pages?

I know I can create a "Pages" model with attributes like "Title", "Content", "Images" etc, and make administrators modify them. But is there a gem for such a thing?

هل كانت مفيدة؟

المحلول

I found a different kind of solution which offered me a more completed way in modifying static pages.

Since pages could be different than simple text I used Mercury editor. Watch the demo in the page. There is a good railscast about that but don't follow it too strictly since something is changed in the new versions(for example the update method is saveUrl while in the cast is called saveURL).

Watch out!: the github project is this, there is another one on github but it didn't work for me. Hope this will help somebody.

نصائح أخرى

Copycopter was created for this sort of thing. Watch the railscast.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top