https://github.com/trailblazer/cells-rails
Rails support for Cells.
https://github.com/trailblazer/cells-rails
Last synced: 5 months ago
JSON representation
Rails support for Cells.
- Host: GitHub
- URL: https://github.com/trailblazer/cells-rails
- Owner: trailblazer
- License: mit
- Created: 2016-02-17T11:10:48.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-11-13T10:35:03.000Z (11 months ago)
- Last Synced: 2025-04-19T03:11:46.248Z (6 months ago)
- Language: Ruby
- Homepage: http://trailblazer.to/gems/cells/rails.html
- Size: 163 KB
- Stars: 53
- Watchers: 10
- Forks: 40
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Cells::Rails
[Cells](https://github.com/apotonick/cells) is a generic view model implementation for Ruby. Cells-rails brings Rails-specific bindings.
## Rails Features
* All asset-related helpers are now simply delegated to the global asset helper instance. This happens by automatically including `Cell::Helper::AssetHelper` into `ViewModel`.
* The global controller is passed to all cells via the context object. It's available via `ViewModel#controller`.
* `ViewModel#call` and `Collection#call` are automatically `html_safe`ed.## Installation
Note that `cells-rails` is designed to work with Cells >= 4.1.
Add this line to your application's Gemfile and keep it real:
```ruby
gem 'cells-rails'
```## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).