GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - boof/shadows: Shadows is an implementation of the Presenter pattern.

BranchesTags
Open more actions menu

Latest commit

 

History

22 Commits
22 Commits

Folders and files

NameName
Last commit message
Last commit date
lib
lib
 
 
test
test
 
 
MIT-LICENSE
MIT-LICENSE
 
 
README.markdown
README.markdown
 
 
Rakefile
Rakefile
 
 
core_init.rb
core_init.rb
 
 
engines_init.rb
engines_init.rb
 
 
init.rb
init.rb
 
 

Repository files navigation

Shadows

Shadows is a simple ActionView based implementation of the Presenter pattern.

SYNOPSIS

app/models/product.rb

class Product < ActiveRecord::Base
  attach_shadows :assigns => :attributes
end

app/shadows/product/self.html.erb

<%= @name %>

app/shadows/product_shadow.rb

class Product::Shadow < Shadows::Base

  def form
    @product.new_record?? render_shape(:new) : render_shape(:edit)
  end

end

app/controllers/products_controller.rb

class ProductsController < ApplicationController

  def show
    product = Product.find params[:id]
    render :text => product.to_s, :layout => true
  end
  def new
    product = Product.new
    # :render not yet implemented
    product.render :form
  end

  # ...

end

SETUP

$ script/plugin install git://github.com/boof/shadows.git

# or
$ git submodule add git://github.com/boof/shadows.git vendor/plugins/shadows

ROADMAP

1st Version of Shadows:

  • should implement Presenter pattern (almost complete)
  • should have a Test suite (almost complete)
  • should have generators (zero)
  • should have documentation (only this file, yet)

Copyright (c) 2009 Florian Aßmann, released under the MIT license

About

Shadows is an implementation of the Presenter pattern.

Resources

Readme
MIT license
Activity

Stars

4 stars

Watchers

3 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.