This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# active_admin and formtastic seem kinda picky about displaying both the | |
# image and the file input together here... in fact, it seems like this | |
# is the ONLY way to do this? Adding anything else after the image_tag squashes it. | |
ActiveAdmin.register Film do | |
form do |f| | |
f.inputs "Film" do | |
f.input :title | |
end | |
f.has_many :stills do |film_still_form| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!!! Strict | |
%html{:xmlns => "http://www.w3.org/1999/xhtml"} | |
%head | |
%meta{:content => "text/html; charset=utf-8", "http-equiv" => "Content-Type"}/ | |
%meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"}/ | |
%title Your Message Subject or Title | |
:css | |
/* Based on The MailChimp Reset INLINE: Yes. */ | |
/* Client-specific Styles */ | |
#outlook a {padding:0;} /* Force Outlook to provide a "view in browser" menu link. */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$src = 'http://player.vimeo.com/video/1234'; | |
preg_match('!video\/([0-9]+)!i', $src, $match); | |
$id = $match[1]; | |
$apiurl = 'http://vimeo.com/api/v2/video/' . $id . '.json'; | |
$response = file_get_contents($apiurl); | |
$json = json_decode($response, true); |