Sha256: ce23eddf432a7cf2e0d047e199e17728b26aec60d6d2d086724dc4aa8855c978
Contents?: true
Size: 479 Bytes
Versions: 18
Compression:
Stored size: 479 Bytes
Contents
class UsersController < ApplicationController before_filter :set_user def index @users = User.all end def show end def new end def create if @user.save flash[:notice] = t(".user_was_created") redirect_to user_path(@user) else flash[:error] = @user.errors.full_messages.join(". ") render :new end end def edit end private def set_user @user = User.find(params[:id].to_i) if params[:id].to_i > 0 end end
Version data entries
18 entries across 18 versions & 1 rubygems