Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/phoet/partially_useful
:bookmark_tabs: :eyes: Helps identifying partials in verbose HTML source code.
https://github.com/phoet/partially_useful
partials rails ruby view
Last synced: 11 days ago
JSON representation
:bookmark_tabs: :eyes: Helps identifying partials in verbose HTML source code.
- Host: GitHub
- URL: https://github.com/phoet/partially_useful
- Owner: phoet
- License: other
- Created: 2014-05-11T22:49:24.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2019-05-15T18:01:34.000Z (over 5 years ago)
- Last Synced: 2024-10-13T13:36:20.368Z (25 days ago)
- Topics: partials, rails, ruby, view
- Language: Ruby
- Homepage: https://github.com/phoet/partially_useful
- Size: 44.9 KB
- Stars: 23
- Watchers: 4
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# PartiallyUseful
[![Build Status](https://img.shields.io/travis/phoet/partially_useful/master.svg)](https://travis-ci.org/phoet/partially_useful)
HTML source code is very verbose and can be a pain in the ass to find a specific part on big pages.
Finding the origin of a piece of HTML in the Rails `app/views` directory can be tedious and error prone.
Adding this gem to your Rails application adds HTML comments at development time, so it's easy to find the right partials.
```html
[...]
```
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'partially_useful', group: 'development'
```## Usage
The plugin is enabled by default, but you can disable it in your Rails configuration:
```ruby
# config/environments/development.rb
config.partially_useful = false
```## Caveats
HTML comments might subtly break your application when partials are used out of the usual HTML rendering context (JS, CSS etc).
If you run into any problems, make sure to disable the gem and restart your Rails server.
## Supported Ruby and Rails versions
Version 6.0.x has support for Rails 6.0.x.
Version 5.1.0 has support for Rails 5.x and Ruby 2.x.
Older Rails and Ruby versions are supported by the 0.x releases.## Contributing
1. Fork it ( https://github.com/phoet/partially_useful/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request## License
See [LICENSE.md](https://github.com/phoet/partially_useful/blob/master/LICENSE.md).
## Changelog
See [CHANGELOG.md](https://github.com/phoet/partially_useful/blob/master/CHANGELOG.md).