Sha256: f19fabea4c3ef12bec8c8df7265d661dd7b84fb7c860cdd5a9a8b05bbbd091b9

Contents?: true

Size: 1.39 KB

Versions: 3

Compression:

Stored size: 1.39 KB

Contents

# Lasha
Short description and motivation.

## Usage
Controller `index` action
```
@data = Lasha.index_data(
  controller: self,
  # namespace: :admin, # optional
  # model: TxFee,      # optional
  collection: TxFee.all.order(created_at: :desc).limit(20),
  attributes: %i[amount node_id created_at],
  # actions: %i[show]  # optional
)
```
`index_data` input options
```
controller: (required) used to derive namespace and index actions
collection: (required) array or AR collection
attributes: (required) model attributes determine which index columns are shown
namespace-: (optional) controller namespace (derive from controller)
model-----: (optional) derive from collection
actions---: (optional) derive from controller, can contain %i[new show edit destroy]
```

index view `index.html.slim`
```
= render partial: "shared/index_generator", locals: { data: @data }
```

## Installation
Add this line to your application's Gemfile:

```ruby
gem 'lasha'
```

And then execute:
```bash
$ bundle
```

Or install it yourself as:
```bash
$ gem install lasha
```

## Development Helpers
Snippet for quickly rebuilding gem
```
cd ~/gem_dir
gem uninstall lasha; rake build; gem install pkg/lasha-0.2.4.gem
```

## Contributing
PR will do. Also, you can contact me if you want to discuss large scale ideas.

## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lasha-0.2.7 README.md
lasha-0.2.6 README.md
lasha-0.2.5 README.md