GitXplorerGitXplorer
j

better_partials

public
23 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
ff9aa9ea41782cf91402df04ed73c6e33f88b762

jjcnetdev committed 16 years ago
Unverified
a58d050810b6a04454fbdb4fc2f82614f4399835

Updated README

committed 16 years ago
Unverified
d4fa9aa3397bf85652e0c18757e8528422015acb

Removed dependency on Rails 2.1 to allow unpacking of gem. Bumped version to 1.1.3 so Github will rebuild.

committed 16 years ago
Unverified
bb3f9ee1bc6deb93ad9d768b0a3324e778ff6db5

Bumped version to get github to build gem

committed 16 years ago
Unverified
c9fd6bb985a23dd03415042c62630a602f1b4f60

Refactored the way module is included in ActionView::Base to make initialization work as a vendored gem

committed 16 years ago
Unverified
6d8671562b52d541fd2a3c6fd265c0491122b46d

Updating to Support Rails 2.2 (:as param). Thanks grosser for the heads up!

jjcnetdev committed 16 years ago

README

The README file for this repository.

= better_partials Provides syntactic sugar for render :partial.

== Examples

=== Render a partial <%= partial "people/search_box" %>

=== Pass some parameters in <% form_for @person do |f| %> <%= partial "people/form", :f => f %> <% end %>

=== Pass in a collection

<%= partial "people/person", :collection => @people %>

Or the terse way...

<%= partials @people %>

Also works, but not as nice reading...

<%= partial @people %>

=== Rendering a block

<% partial "people/box" do %> Inner content goes here.. (gets called in your partial's yield statement) <% end %>

=== Special Options These special options pass through to render :partial. All others are passed through as :locals.

:collection :spacer_template :object :use_full_path

== Installation === Install Plugin

script/plugin install git://github.com/jcnetdev/better_partials.git

=== Install Gem

If you're using Rails 2.1, you -can- should use the plugin as a gem.

Add this to your environment.rb:

config.gem 'jcnetdev-better_partials', :version => '>= 1.1.3', :lib => 'better_partials', :source => 'http://gems.github.com'

To install:

rake gems:install

To unpack:

rake gems:unpack

Copyright (c) 2008 Jacques Crocker (www.railsjedi.com), released under the MIT license