Home > painless_partials

painless_partials

Painless_partials is a project mainly written in Ruby, it's free.

markups html/xml by comments with partial paths

= PainlessPartials

In case when we need to override some partial which may be plased in some engine-gem it may be painfull to findout which partial are rendered in certain place.

For this purposes created gem painless_partials. It aimed to:

  • as-minimum: markup html/xml by comments with partial paths (done)
  • as-maximum: provide service for coping partial from gem into main app (50% done) or into some extension (site-theme and so on)

It is usefurl, for example, in development of application based on spree.

Works with Rails 3.0+

== Usage

Add gem into Gemfile

gem 'painless_partials'

or

gem 'painless_partials', :git => 'git://github.com/x2es/painless_partials.git'

== Example

Just open page source in browser and find comment "TEMPLATE /path/to/partial.html.erb" placed above code which you want to override. For example:

Also painless_partials gives tip about how to override partial. For example: In common case all you need it to point project or engine/extension dir in your therminal and invoke this command. Tip will be shown only for "foreign" sources. "Foreign" means - sources placed outside "#{Rails.root}/../". So if you develop extensions placed in #{Rails.root}/../my-extensions/ - tip does not appears for this sources. == Inspirited by * https://github.com/fcheung/tattler Also good partials helper with javascript ui: https://github.com/markevans/partial_identifier == Issues & TODO See https://github.com/x2es/painless_partials/issues