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

markevans / partial_identifier

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

click here to add a description

click here to add a homepage

  • Branches (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.

Plugin for rails, using jQuery, which allows you to identify rendered templates and link to them in TextMate — Read more

  cancel

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

This URL has Read+Write access

Added ability to turn off partial identifier with 'bypass' file 
markevans (author)
Thu Aug 20 04:19:02 -0700 2009
commit  15766954f7faef10a1ef336bb8c4461f0ad6367e
tree    d443e8e19ac24f3c826c6b884d7280d5329dc30c
parent  c29e6b99d57b2dcbb8af2c1a3f608b01e5e94953
partial_identifier /
name age
history
message
file .gitignore Loading commit data...
file MIT-LICENSE
file README.markdown
file Rakefile
file config.rb
file init.rb
file install.rb
directory lib/
directory public/
directory spec/
directory tasks/
file uninstall.rb
README.markdown

Partial Identifier

Ever been checking your development rails app in the browser and wanted to know which ERB file a part of your page is from? Wanted to know the rendered file hierarchy all the way up to the layout? Wanted to quickly open one of those files in textmate?

This plugin makes it easy peasy to do just that!

Usage

  1. Install the plugin

    script/plugin install git://github.com/markevans/partial_identifier.git
    
  2. Browse your app in development mode (after restarting the server) Press Shift + Ctrl + P to toggle the partial identifier on.

  3. Click on a part of the page you want to inspect - this will display its partial hierarchy in the top left (each time you click you will update the partial hierarchy)

  4. If you have textmate, clicking one of the partial links will open that file in textmate!

  5. When finished, press Shift + Ctrl + P again to turn the partial identifier off.

Notes

  • This only works in development mode, so won't interfere with anything on production
  • If you're using version control you will probably want to ignore the created files as it's useful for your development only
  • It is fairly unobtrusive to the page DOM - it simply inserts invisible divs
  • It uses the bundled version of jquery if you don't already have it, otherwise uses the one you're using
  • I've noticed that it doesn't work too well if a partial wraps a table row <tr> element, because Firefox etc. automatically remove divs (generated by this plugin) from inside the table.
  • It's quite slow turning on if firebug is open - just close the panel and it should speed up.
  • You can temporarily disable it by doing touch public/partial_identifier/bypass (you may need to restart the server). Delete this file to re-enable it.

TODO

Get it to work with HAML

Copyright (c) 2008 [Mark Evans], released under the MIT license

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