mdarby / acts_as_video_fu
- Source
- Commits
- Network (6)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Tree:
0d53c28
commit 0d53c2882a9b3b17f770c5b2a522718edb15c00c
tree 0b849da7e101f23fff35686f5aaa018ab9c34bbf
parent ca7b83107a0850aa7e86f8f569a1e2fe2d7ec0bd
tree 0b849da7e101f23fff35686f5aaa018ab9c34bbf
parent ca7b83107a0850aa7e86f8f569a1e2fe2d7ec0bd
| name | age | message | |
|---|---|---|---|
| |
MIT-LICENSE | Sun Oct 05 07:35:16 -0700 2008 | |
| |
README.textile | Sun Dec 14 12:15:27 -0800 2008 | |
| |
Rakefile | Sun Oct 05 07:35:16 -0700 2008 | |
| |
acts_as_video_fu.gemspec | ||
| |
init.rb | Sun Dec 14 12:10:36 -0800 2008 | |
| |
install.rb | Sun Oct 05 07:35:16 -0700 2008 | |
| |
lib/ | ||
| |
rails/ | Sun Dec 14 12:10:36 -0800 2008 | |
| |
tasks/ | Sun Oct 05 07:35:16 -0700 2008 | |
| |
test/ | Sun Oct 05 07:35:16 -0700 2008 | |
| |
uninstall.rb | Sun Oct 05 07:35:16 -0700 2008 |
README.textile
ActsAsVideoFu
A Rails plugin that easily allows you to show video streams on your site.
Currently, YouTube and Vimeo streams are supported.
Note that #video_url is expected to be in these formats: YouTube: http://www.youtube.com/watch?v=gEILFf2XSrM Vimeo: http://www.vimeo.com/726135
Installation
- Install the gem
sudo gem install mdarby-acts_as_video_fu
- Require the gem in your config/environment.rb file
config.gem ‘mdarby-acts_as_video_fu’, :lib => ‘acts_as_video_fu’
Example
- Generate a resource that includes the title:string and video_url:string attributes
./script/generate scaffold Video title:string video_url:string
- Add ‘acts_as_video_fu’ to your model
class Video < ActiveRecord::Base
acts_as_video_fu
end
- Show the video’s thumbnail in any view you might like
<%= image_tag thumbnail_url(video) %>
- Add the ‘display_video’ helper to show the full-sized video in any view you might like
<%= display_video(@video) %>
Copyright © 2008 Matt Darby, released under the MIT license

