Class: Framey::VideosController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Framey::VideosController
- Defined in:
- lib/rails/generators/framey/templates/videos_controller.rb
Instance Method Summary collapse
-
#callback ⇒ Object
framey callback.
- #index ⇒ Object
- #new ⇒ Object
- #show ⇒ Object
Instance Method Details
#callback ⇒ Object
framey callback
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/rails/generators/framey/templates/videos_controller.rb', line 11 def callback render :text => "" and return unless request.post? && params[:video] video = Video.create!({ :name => params[:video][:name], :filesize => params[:video][:filesize], :duration => params[:video][:duration], :state => params[:video][:state], :views => params[:video][:views], :flv_url => params[:video][:flv_url], :mp4_url => params[:video][:mp4_url], :small_thumbnail_url => params[:video][:small_thumbnail_url], :medium_thumbnail_url => params[:video][:medium_thumbnail_url], :large_thumbnail_url => params[:video][:large_thumbnail_url] }) render :text => "" and return end |
#index ⇒ Object
30 31 32 33 |
# File 'lib/rails/generators/framey/templates/videos_controller.rb', line 30 def index @videos = Framey::Video.all end |
#new ⇒ Object
6 7 8 |
# File 'lib/rails/generators/framey/templates/videos_controller.rb', line 6 def new end |