Class: UsersController
Instance Method Summary
collapse
app_class_eval, app_instance_eval, inherited
require_all_models, require_models
Instance Method Details
#all ⇒ Object
11
12
13
|
# File 'app/controllers/users_controller.rb', line 11
def all
@users = User.all
end
|
#create(params) ⇒ Object
23
24
25
26
|
# File 'app/controllers/users_controller.rb', line 23
def create(params)
@user = User.new params[:user]
@user.save
end
|
#find_by ⇒ Object
15
16
17
|
# File 'app/controllers/users_controller.rb', line 15
def find_by
@user = User.find_by({:name => "andrew", :id => 5}, :conjunction => 'OR')
end
|
#index ⇒ Object
7
8
9
|
# File 'app/controllers/users_controller.rb', line 7
def index
@user = User.find(1)
end
|
#new ⇒ Object
19
20
21
|
# File 'app/controllers/users_controller.rb', line 19
def new
@user = User.new
end
|