Sha256: e107fe938b04f0711f2014c1de11102c003ec987098c987e2acf264dc07f03c9

Contents?: true

Size: 427 Bytes

Versions: 5

Compression:

Stored size: 427 Bytes

Contents

class UsersController < ApplicationController
  def index
    @users = User.all
  end

  def new
    @date     = params[:date].present?
    @time     = params[:time].present?
    @datetime = params[:datetime].present? || (!@date && !@time)
  end

  def create
    User.create(params[:user])
    redirect_to users_path
  end

  def block
    @user = User.find(params[:id])
    @user.block!

    redirect_to users_path
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
hermes-0.5.1 test/rails_app/app/controllers/users_controller.rb
hermes-0.5.0 test/rails_app/app/controllers/users_controller.rb
hermes-0.4.1 test/rails_app/app/controllers/users_controller.rb
hermes-0.4.0 test/rails_app/app/controllers/users_controller.rb
hermes-0.3.0 test/rails_app/app/controllers/users_controller.rb