Class: AtomicAdmin::AtomicLtiInstallController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- AtomicAdmin::AtomicLtiInstallController
- Defined in:
- app/controllers/atomic_admin/atomic_lti_install_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
- #find_install ⇒ Object
- #index ⇒ Object
- #install_params ⇒ Object
- #show ⇒ Object
- #update ⇒ Object
Instance Method Details
#create ⇒ Object
15 16 17 |
# File 'app/controllers/atomic_admin/atomic_lti_install_controller.rb', line 15 def create AtomicLti::Install.create!(install_params) end |
#destroy ⇒ Object
30 31 32 33 34 |
# File 'app/controllers/atomic_admin/atomic_lti_install_controller.rb', line 30 def destroy install = find_install install.destroy render json: install end |
#find_install ⇒ Object
7 8 9 |
# File 'app/controllers/atomic_admin/atomic_lti_install_controller.rb', line 7 def find_install AtomicLti::Install.find_by(id: params[:id]) end |
#index ⇒ Object
11 12 13 |
# File 'app/controllers/atomic_admin/atomic_lti_install_controller.rb', line 11 def index render json: AtomicLti::Install.all.order(:id).paginate(page: params[:page], per_page: 30) end |
#install_params ⇒ Object
3 4 5 |
# File 'app/controllers/atomic_admin/atomic_lti_install_controller.rb', line 3 def install_params params.permit(:iss, :client_id) end |
#show ⇒ Object
19 20 21 22 |
# File 'app/controllers/atomic_admin/atomic_lti_install_controller.rb', line 19 def show install = find_install render json: install end |
#update ⇒ Object
24 25 26 27 28 |
# File 'app/controllers/atomic_admin/atomic_lti_install_controller.rb', line 24 def update install = find_install result = install.update!(install_params) render json: result end |