Class: Quadro::PagesController
Instance Method Summary
collapse
#after_sign_in_path_for, #after_sign_out_path_for
Instance Method Details
#create ⇒ Object
11
12
13
14
|
# File 'app/controllers/quadro/pages_controller.rb', line 11
def create
page.author = current_user
page.save
end
|
#destroy ⇒ Object
20
21
22
|
# File 'app/controllers/quadro/pages_controller.rb', line 20
def destroy
page.destroy unless page.is_root?
end
|
24
25
26
27
28
|
# File 'app/controllers/quadro/pages_controller.rb', line 24
def form
interaction.ip_address = request.remote_ip
interaction.user_agent = request.user_agent
interaction.update_attributes(content: params[:form])
end
|
#update ⇒ Object
16
17
18
|
# File 'app/controllers/quadro/pages_controller.rb', line 16
def update
page.update_attributes(params[:page])
end
|