Class: Refinery::Admin::CoreController

Inherits:
Refinery::AdminController show all
Defined in:
core/app/controllers/refinery/admin/core_controller.rb

Instance Method Summary collapse

Methods included from BaseController

#admin?, #searching?

Methods included from Refinery::ApplicationController

#admin?, #error_404, #from_dialog?, #home_page?, #just_installed?, #local_request?, #login?

Instance Method Details

#update_plugin_positionsObject



4
5
6
7
8
9
10
11
# File 'core/app/controllers/refinery/admin/core_controller.rb', line 4

def update_plugin_positions
  params[:menu].each_with_index do |plugin_name, index|
    if (plugin = current_refinery_user.plugins.find_by_name(plugin_name))
      plugin.update_attributes :position => index
    end
  end
  render :nothing => true
end