Class: UsersController

Inherits:
MVCLI::Controller
  • Object
show all
Defined in:
app/controllers/users_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



9
10
11
12
13
14
15
# File 'app/controllers/users_controller.rb', line 9

def create
  template = Users::CreateForm
  argv = MVCLI::Argv.new command.argv
  form = template.new argv.options
  form.validate!
  instance.users.create form.value
end

#indexObject



5
6
7
# File 'app/controllers/users_controller.rb', line 5

def index
  instance.users.all
end