Sha256: d13a63758a8598a06a69de99fd2aeb2a4d84fec0a9df0c28849ce00add8bae97
Contents?: true
Size: 1016 Bytes
Versions: 14
Compression:
Stored size: 1016 Bytes
Contents
class RolesController < ApplicationController load_and_authorize_resource # GET /roles # GET /roles.json def index respond_to do |format| format.html # index.html.erb format.json { render :json => @roles } end end # GET /roles/1 # GET /roles/1.json def show respond_to do |format| format.html # show.html.erb format.json { render :json => @role } end end # GET /roles/1/edit def edit end # PUT /roles/1 # PUT /roles/1.json def update if params[:move] move_position(@role, params[:move]) return end respond_to do |format| if @role.update_attributes(params[:role]) format.html { redirect_to @role, :notice => t('controller.successfully_updated', :model => t('activerecord.models.role')) } format.json { head :no_content } else format.html { render :action => "edit" } format.json { render :json => @role.errors, :status => :unprocessable_entity } end end end end
Version data entries
14 entries across 14 versions & 1 rubygems