Skip to content

Management

Ondřej Moravčík edited this page Sep 26, 2018 · 1 revision

For managing a rys plugin.

  • Creating and changing settings
  • Toggling features

Usage

Let's say your rys is called 'my_rys' and you are storing key 'my_value'

  1. View template

Inside your rys create app/views/rys_management/plugins/_my_rys.html.erb. This file is automatically created if plugin was generated by rys >= 1.1

<p>
  <%= form.label :my_value %>
  <%= form.text_field :my_value %>
</p>
  1. Accessing
# Via plugin
MyRys.setting(:my_value)
MyRys.set_setting(:my_value, VALUE)
# Direct access
EasySetting.value(:my_rys_my_value)
EasySetting.find_by(name: 'my_rys_my_value')

Rys basic

Dependencies

Tests

Management

Clone this wiki locally