Project

General

Profile

map from settins plugin, link to top menu from settings plugin

Added by Mikhail Yourievich over 10 years ago

How can I save and get values map of setting field in my plugin, I think, smth, such as, but it's not working.

<% groups.each_with_index do |group| %>
  <tr class="<%= cycle 'odd', 'even' %>">
    <td class="name"><%= check_box_tag 'settings[groups[]]', group.name, 'settings[groups[]]'.to_i == 1, :id => nil %><%= link_to h(group), edit_group_path(group) %></td>

How can I insert link to top menu to external site, which enter in a settings of my plugin:

on settings form, it's not working

<p><label for="settings_link">Link http://www.</label><%= text_field_tag 'settings[link]', @settings['link'] %></p>

on init.rb:
 settings(:default => {
               'link' => 'mysite.com'
             },:partial => 'settings/settings') 
 menu :top_menu, "", "http://www." + Setting.plugin_reports['link'].to_s ,
        :caption => "reports"