Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lab2023/blankable
Adds blank slates to index view
https://github.com/lab2023/blankable
Last synced: about 2 months ago
JSON representation
Adds blank slates to index view
- Host: GitHub
- URL: https://github.com/lab2023/blankable
- Owner: lab2023
- License: mit
- Created: 2013-08-09T13:08:26.000Z (over 11 years ago)
- Default Branch: develop
- Last Pushed: 2015-08-30T12:06:50.000Z (over 9 years ago)
- Last Synced: 2024-03-23T02:34:19.117Z (10 months ago)
- Language: Ruby
- Homepage:
- Size: 184 KB
- Stars: 8
- Watchers: 14
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Blankable
Adds blank slates to index view
## Installation
Add this line to your application's Gemfile:
gem 'blankable'
And then execute:
$ bundle
Or install it yourself as:
$ gem install blankable
## Usage
```ruby
# Customers Controller
class CustomersController < ApplicationController
def index
@customers = Customer.all
respond_with(@customers)
end
end
``````haml
# views/customers/_list.html.haml
%table
%tr
%th Name
%th Business Phone
%th Mobile Phone
%th Address- @customers.each do |customer|
%tr
%td= customer.name
%td= customer.business_phone
%td= customer.mobile_phone
%td= customer.address
``````haml
# views/customers/_blank.html.haml
= link_to 'Add your first customer', new_customer_path
``````haml
# views/customers/index.html.haml
= blankable @customers
```## Contributing
1. Fork it
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 new Pull Request## Credits
![lab2023](http://lab2023.com/assets/images/named-logo.png)
- Blankable is maintained and funded by [lab2023 - information technologies](http://lab2023.com/)
- Thank you to all the [contributors!](../../graphs/contributors)
- The names and logos for lab2023 are trademarks of lab2023, inc.## License
Copyright 2014 lab2023 – information technologies