Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

update readme

  • Loading branch information...
commit 8e236d36176331a3a3b1af681629b2e4c979fe87 1 parent 3e3fb20
@tb authored
Showing with 15 additions and 16 deletions.
  1. +15 −16 README.rdoc
31 README.rdoc
@@ -1,39 +1,38 @@
-= Archetype
+= Inherited Resources Archetypes
-Archetype is a tool to support archetype-based apprach to share controllers and views behaviours.
-It can help you to manage controllers and views code with reuse in mind.
+This gem is a set of helpers to support archetype-based apprach
+to share controllers and views behaviours with Inherited Resources.
= Installation
Add do Gemfile
- gem 'archetype_helpers', :git => 'git://'
+ gem 'archetype', :git => 'git://'
+ gem 'inherited_resources_archetypes', :git => 'git://'
= Usage
Create an initializer with following code:
Archetype::Base.register_archetype :crud do
+ append_view_path"archetype/crud")
+ append_view_path"archetype/crud")
- append_view_path"archetype/crud")
- include Helpers::InheritedResources::OnUpdateSuccessRedirectToEdit
- include Helpers::InheritedResources::OnCreateSuccessRedirectToEdit
- include Helpers::PerPage
+ include Archetype::Helpers::InheritedResources
+ include Archetype::Helpers::InheritedResources::OnUpdateSuccessRedirectToEdit
+ include Archetype::Helpers::InheritedResources::OnCreateSuccessRedirectToEdit
-Now you can define your controller, for example:
+Now you can define your controller to use 'crud' archetype like this:
class UsersController < ApplicationController
archetype :crud
-The action templates for the action will be taked from "views/archetype/crud".
-Archetype comes with a default set of vies for 'crud' archetype, so unless
-you want to overwrite those, all you have to do is define partials like those:
- _form.html.erb
- _list.html.erb
- _list_item.erb
+ * implement 5-7 archetypes & views
+ * document archetypes + ilustrate them with pictures
+ * publish some example Rails engines that use archetypes
Copyright (c) 2011 Tomasz Bąk, released under the MIT license
Please sign in to comment.
Something went wrong with that request. Please try again.