Sha256: e53e4bd3a42a8c6e50acda022e9dfabc3ba2cd968830e377bce8a4ee821a5ac8

Contents?: true

Size: 1.11 KB

Versions: 1

Compression:

Stored size: 1.11 KB

Contents

# HydraEditor [![Gem Version](https://badge.fury.io/rb/hydra-editor.png)](http://badge.fury.io/rb/hydra-editor)

To use add to your gemfile:

```ruby
gem 'hydra-editor'
```

And to config/routes.rb add:

```ruby
  mount HydraEditor::Engine => '/'
```

In your initialization set ```HydraEditor.models```

```ruby
# config/initializers/hydra_editor.rb
HydraEditor.models = ["RecordedAudio", "PdfModel"]
```

You can customize the names of your fields/models by adding to your translation file:

```yaml
# config/locales/en.yml
en:
  hydra:
    field_label:
      source2: "Alternate Source"
      dateCreated: "Date Created"
      dateAvailable: "Date Available"
    model_label:
      PdfModel: "PDF"
      RecordedAudio: "audio"

```

Expects the following interface on your hydra models:

```terms_for_editing``` returns an array of model attributes to edit

Add the javascript by adding this line to your app/assets/javascript/application.js:

```javascript
//= require hydra-editor/hydra-editor
```

Add the stylesheets by adding this line to your app/assets/stylesheets/application.css:
```css
 *= require hydra-editor/hydra-editor
```

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hydra-editor-0.0.6 README.md