Coder Social home page Coder Social logo

ventana-rails's Introduction

Ventana

Ventana is a lightweight rails content management system. It allows the developer to specify small blocks of unstructured editable content. This is helpful for landing pages and small blocks for unstructured copy text. If you need a full content management system you should use other content management systems for rails. If you are looking for a solution to easily manager your application code use copycopter

Installation

Ventana is distributed as a gem, which is how it should be used in your app.

Include the gem in your Gemfile:

gem 'ventana', git: 'git://github.com/thoughtbot/ventana.git'

Then run

rake ventana:install:migrations
rake db:migrate

Finally add the following to you config/routes.rb

mount Ventana::Engine => "/ventana"

Quick Start

In user model:

Define can_edit? on your user model which will desigate who is allowed to edit ventana content blocks

class User < ActiveRecord::Base
  def can_edit?
    id == 1
  end
end

In a view:

<%= editable_content_for(:about_page, type: :markdown) %>

Next login as a user who is allowed to edit that block and you should see and edit link where this block was rendered. Click "Edit" and it will bring you to the vetana edit page.

In context editing using javascript

See ventana-example for how to setup incontext javascript editing

Credits

thoughtbot

ventana is maintained and funded by thoughtbot, inc

The names and logos for thoughtbot are trademarks of thoughtbot, inc.

License

ventana is Copyright © 2008-2012 Mason Fischer and thoughtbot. It is free software, and may be redistributed under the terms specified in the LICENSE file.

ventana-rails's People

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.