Sha256: 96eee542f7ae74b5f624fdd09c524e3d8f9cdf36fa36b3ab6e214a77c3914c70
Contents?: true
Size: 436 Bytes
Versions: 4
Compression:
Stored size: 436 Bytes
Contents
class Citygate::HomeController < Citygate::ApplicationController authorize_resource :class => false skip_authorize_resource :only => :role_change def index @users = Citygate::User.all end def role_change saved = current_user.update_attribute :role_id, params[:data] respond_to do |format| format.json { render json: { text: (saved) ? "OK" : "Arrebentou", redirect: root_path } } end end end
Version data entries
4 entries across 4 versions & 1 rubygems