Class: FlyAdmin::VideosController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- FlyAdmin::VideosController
- Defined in:
- app/controllers/fly_admin/videos_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /videos.
-
#destroy ⇒ Object
DELETE /videos/1.
-
#edit ⇒ Object
GET /videos/1/edit.
-
#index ⇒ Object
GET /videos.
-
#new ⇒ Object
GET /videos/new.
-
#show ⇒ Object
GET /videos/1.
-
#update ⇒ Object
PATCH/PUT /videos/1.
Methods inherited from ApplicationController
Instance Method Details
#create ⇒ Object
POST /videos
28 29 30 31 32 33 34 35 36 |
# File 'app/controllers/fly_admin/videos_controller.rb', line 28 def create @video = Video.new(video_params) if @video.save redirect_to @video, notice: 'Video was successfully created.' else render :new end end |
#destroy ⇒ Object
DELETE /videos/1
48 49 50 51 |
# File 'app/controllers/fly_admin/videos_controller.rb', line 48 def destroy @video.destroy redirect_to videos_url, notice: 'Видео успешно удалено!!!!' end |
#edit ⇒ Object
GET /videos/1/edit
24 25 |
# File 'app/controllers/fly_admin/videos_controller.rb', line 24 def edit end |
#index ⇒ Object
GET /videos
8 9 10 11 12 |
# File 'app/controllers/fly_admin/videos_controller.rb', line 8 def index if request.post? || redirected_after_uploading? filter_results end end |
#new ⇒ Object
GET /videos/new
19 20 21 |
# File 'app/controllers/fly_admin/videos_controller.rb', line 19 def new @video = Video.new end |
#show ⇒ Object
GET /videos/1
15 16 |
# File 'app/controllers/fly_admin/videos_controller.rb', line 15 def show end |
#update ⇒ Object
PATCH/PUT /videos/1
39 40 41 42 43 44 45 |
# File 'app/controllers/fly_admin/videos_controller.rb', line 39 def update if @video.update(video_params) redirect_to @video, notice: 'Video was successfully updated.' else render :edit end end |