A plugin for Refinery CMS to manage features. Features are small pieces of information geolocated.
JavaScript Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
config
db
lib
public
.gitignore
readme.md
refinerycms-features.gemspec

readme.md

Refinery CMS Features

A plugin for Refinery CMS to manage features. Features are small pieces of information geolocated.

Installation

Add the following line to your Gemfile file:

gem 'refinerycms-features', '= 0.2', :require => 'features', :git => 'git://github.com/Vizzuality/refinerycms-features.git'

And then run bundle install.

Now you'll be able to use the generator refinery_features:

script/rails generate refinery_features

This will create a migration and a seeds file.

Then run:

rake db:migrate

And the plugin will be ready to use.

Feature model

An event is very simple:

  • title (string)
  • description (text)
  • the_geom (geometry)
  • meta (text)
  • gallery_id (integer)

Meta field

meta field serializes all the metainformation, in a document-style object. It is used in combination with the Refinery setting :feature_attributes, which contains a list of all the attributes and their type. For example:

location:string
country:string
references:text

All this fields are automatically added as getters and setters.

TheGeom field

the_geom field contains all the geometric information related with the feature. Depending on the value of the Refinery setting :feature_geom_type, it will be a point, a polygon, and so on...