chrisfield / ecogardeners

A simple rails site for East Cheshire Organic Gardeners using Comfy CMS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README

This rails 4.0.3 application makes use of Comfy CMS to provide a lightweight facility for users to maintain their own page content. For an example of the application running on heroku take a look at www.ecogardeners.org.

I wrote the application as a one-off for the organic gardening group and even though almost all of the application is generic it does have a few specific headings and icons (eg the favicon the layout/application.erb navbar and the footer).

The authenication to gain access to edit pages is implemented with a User model which has_secure_password. The /admin root is the one to use to login to the CMS. For my purposes I’m not likely to have many new admin users so I just used the console to add users rather than having a form which only an authenticated set of super users could access.

Running rake db:migrate will create the comfy/cms tables and the user table.

Then in a rails console: user = User.new(:email => “user@name.com”, :password => ‘password’, :password_confirmation => ‘password’) user.save

Next run the rails server, go to the /admin path and define the Site and Pages and edit layout/application.erb as required.

Flickr

I wanted it to be easy to add an album of flickr photos to a page. Liquid tags like {{ cms:helper:list_image_tags:ecog_2013 }} embedded within a page call the list_image_tags helper which, in this case, will add all the images from the “ecog 2013” album. The flickr credentials are read in by the flickr.rb initialiser via enviroment variables managed by the handy “figaro” gem.

rake doc:app.

About

A simple rails site for East Cheshire Organic Gardeners using Comfy CMS


Languages

Language:Ruby 77.2%Language:HTML 14.6%Language:CSS 5.7%Language:JavaScript 1.7%Language:CoffeeScript 0.8%