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

Version Path
awesome_translations-0.0.20 spec/dummy/app/controllers/users_controller.rb
awesome_translations-0.0.19 spec/dummy/app/controllers/users_controller.rb
awesome_translations-0.0.18 spec/dummy/app/controllers/users_controller.rb
awesome_translations-0.0.17 spec/dummy/app/controllers/users_controller.rb
awesome_translations-0.0.16 spec/dummy/app/controllers/users_controller.rb
awesome_translations-0.0.15 spec/dummy/app/controllers/users_controller.rb
awesome_translations-0.0.14 spec/dummy/app/controllers/users_controller.rb
awesome_translations-0.0.13 spec/dummy/app/controllers/users_controller.rb
awesome_translations-0.0.12 spec/dummy/app/controllers/users_controller.rb
awesome_translations-0.0.10 spec/dummy/app/controllers/users_controller.rb
awesome_translations-0.0.9 spec/dummy/app/controllers/users_controller.rb
awesome_translations-0.0.8 spec/dummy/app/controllers/users_controller.rb
awesome_translations-0.0.7 spec/dummy/app/controllers/users_controller.rb
awesome_translations-0.0.6 spec/dummy/app/controllers/users_controller.rb
awesome_translations-0.0.5 spec/dummy/app/controllers/users_controller.rb
awesome_translations-0.0.4 spec/dummy/app/controllers/users_controller.rb
awesome_translations-0.0.3 spec/dummy/app/controllers/users_controller.rb
awesome_translations-0.0.2 spec/dummy/app/controllers/users_controller.rb