3

What's the best solution to creating dynamic pages in Rails? I'm working on a simple admin interface where I want to be able to create pages of content and have them dynamically added to the site without having to have them added to the controller.

Ie, don't want to do this in pages controller.

def about
...
end

def privacy
...
end

I was thinking of doing something like have all pages use the show action which looks at url by permalink and fetches that from the database although I'm not sure the best approach to doing this. Any feedback on this would be great.

1
  • 1
    If you need fully customizable pages (including changes to the application layout and/or controller layout, then you'll need to access Rails' ActionView::Resolver. Commented May 20, 2011 at 4:36

2 Answers 2

4

I think this is exactly what you need: Railscast - Semi-Static Pages

Sign up to request clarification or add additional context in comments.

Comments

0

You can use High Voltage gem.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.