I need some advice on how to create a Video model in Rails, so that I can each time update the database with new videos’ addresses. For example having an administrative page,where the admin can add a video by entering the local address of it. Like uploading a facebook pic. How can I approach this? I am kinda new to RoR.
Share
If this is like a blog, and you will be adding new videos to your database, check out the paperclip gem https://github.com/thoughtbot/paperclip, and this should do the trick. You just upload the videos to a storage system (Amazon S3 is very popular), and paperclip handles everything behind the scenes.
If this is more like you are linking to other people’s videos on the net (aka youtube videos), you could make a helper method that would take a link and render out the youtube container to display on your site.