github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

anildigital / partioprint

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 27
    • 3
  • Source
  • Commits
  • Network (3)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (2)
    • 2-1
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

It helps you to find out what partials were rendered for the generating html with erbs — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Added partial absolute path support to the START and END comments 
Haris (author)
Thu Jan 21 00:09:01 -0800 2010
anildigital (committer)
Tue Jan 26 06:57:27 -0800 2010
commit  94763eff84147c8a9a07171117c2441cfbb15062
tree    ed81c1014d740f0ba87519bc108df3c5c29b9969
parent  cbc3a8bd3ce1ff6d7e83fe757e4f86ba4e51f4ef
partioprint /
name age
history
message
file LICENSE Sat Nov 21 08:55:34 -0800 2009 Added Partioprint Rails plugin code [anildigital]
file README.md Tue Jan 26 06:57:27 -0800 2010 Added partial absolute path support to the STAR... [Haris]
file init.rb Sun Nov 22 04:39:03 -0800 2009 Enable for development environment only. [anildigital]
directory lib/ Tue Jan 26 06:57:27 -0800 2010 Added partial absolute path support to the STAR... [Haris]
directory test/ Tue Jan 26 06:57:27 -0800 2010 Added partial absolute path support to the STAR... [Haris]
README.md

Partioprint

Partioprint plugin adds partial name as a HTML comment whenever a partial is rendered from the ERBs. The purpose of this plugin is to ease the front-end web development effort when using lots of partials, if anything is broken in your page, you can quickly inspect it and can figure out which partial to look for, instead going through your logs to determine the target partial or by searching in your editor.

Other features added:

a) The partial absolute path now added to the comments. This helps to understand from where the actual partial is rendered, from within your app or one of the engines that is being used in vendor/plugins.

b) Locals being passed to the partial are also printed.

Partioprint adds two comments tag before and after the partial output. Below is the example

<!-- ERB:START partial: shared/header AND partial_absolute_path: /home/victoria7/projects/sample/app/views/shared/_header.html.erb -->
<!-- START Local variables:-->
<!-- object : null -->
<!-- header : null -->
<!-- END Local variables:-->
<div class="head">...</div>
<!-- ERB:END partial: shared/header AND partial_absolute_path: /home/victoria7/projects/sample/app/views/shared/_header.html.erb -->

Implemented upon idea by Arnab Chakraborty (@arnabc on Twitter)

Use it

Drop this plugin into your project's vendor/plugins folder. Restart the server. View the source. (If you have rendered partials in your views, it will print names of them in generated html code).

For Firebug users click on the down-arrow icon in HTML tab and enable 'Show Comments' to see the comments.

Note: This plugin might cause your webpage to render in quirks mode if you have a different partial to render DOCTYPEs.

Rave Reviews

"Looks cool. We have something similar internally at 37signals. Good to see it released." - @dhh

"It looks cool, will definitely use it for one of my client projects" - @technoweenie

"Just stumbled upon Rails plugin partioprint. Incredibly valuable 20 LOC. Gonna add it to all projects" - @codecuisine

http://railsenvy.com/2009/12/18/episode-103 - Highlighted in Rails Envy Podcast

http://afreshcup.com/home/2009/11/26/double-shot-592.html - Highlighted in Mike Gunderloy's A Fresh Cup

Author

Anil Wadghule :: anildigital@gmail.com :: @anildigital :: http://anilwadghule.com

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server