Ruby on Rails
MasterView Plugin

MasterView is a ruby/rails optimized HTML/XHTML friendly template engine. It is designed to use the full power and productivity of rails including layouts, partials, and rails html helpers while still being editable/styleable in a WYSIWYG HTML editor.

Goals

MasterView is distributed as a gem or a plugin. You may install it as a gem and then generate a lightweight plugin which simply defers to the gem or you can install as a plugin which is self contained. I personally prefer installing as a gem for ease of management, however if you are running at a shared hosting environment you might not have authority to install this gem so you may install as a self contained plugin. Either way works identical once installed.

Rubyforge project: http://rubyforge.org/projects/masterview

Homepage: http://masterview.org/

svn: svn://rubyforge.org/var/svn/masterview/tags/masterview

Primary Developer: Jeff Barczewski (jeff.barczewski @ gmail.com)

Installation instructions

Plugin installation

script/plugin install svn://rubyforge.org/var/svn/masterview/tags/latest

or if you don’t have svn (subversion) installed then you may download the masterview_plugin.tgz or masterview_plugin.zip from http://rubyforge.org/projects/masterview and simply extract it manually into vendor/plugins/masterview

Alternate installation using gems

gem install masterview_gem_pack

script/generate masterview_plugin

This generate command creates a very small masterview plugin and init.rb file which points to the gem.

Usage

You may add MasterView attributes to existing (x)html or you may use the masterview generator to create a complete working application. The generator can create controllers, models, and the MasterView template file similar to how the built-in generator works. Simply change directory to your rails application and run the following

script/generate masterview YourModelName [YourControllerName]

Once it is done generating, the generated MasterView template file(s) will be created in app/views/masterview/*.html. These file(s) are html and can be edited with any standard html editor. The rails specific logic is contained in simple attributes which are ignored by html editors. The syntax for these attributes is heavily derived from the rails helper tags themselves so it should feel natural to the rails developer.

See also Plugins