Building a site: example code?
Fae looks great, I'd love to build some sites using it. But the doc seems to stop at explaining the admin tools. Can you point me to any sample code for building an actual website using the tools?
For example, taking your tutorial to the next step and building pages that show the articles and the about page would save me a lot of time. Does it already exist?
@dparfrey I think fae is already pretty quite straightforward, after fae handle the admin panel side lets say you have a Article build by fae generator... then you can just generate an articles controller add it to Routes.rb
resources :articles
app/controller/articles_controller.rb
def index
#Get all the articles
Article.all
end
cmiiw
Thanks for checking it out @dparfrey. Fae's only concern is the management of the data, how you want to build the frontend is up to you. The most common way is building directly in the Rails app using ActiveRecord or you can have an external app connecting directly to the same DB.
The exceptions are Fae's static pages scheme which is documented here: https://github.com/wearefine/fae/blob/master/docs/topics/pages.md#getting-your-content-blocks
And accessing uploaded assets. Fae uses Carrierwave for it's Fae::Image and Fae::File objects, so their methods apply:
@some_object.some_image.asset_url
Hope this helps!