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
<% @content.medias.build({:key=>"original"}) %> | |
<%= form_for(@content, :html => { :multipart => true }) do |f| %> | |
<div class="field"> | |
<%= f.fields_for :medias do |media| %> | |
<%= media.file_field :file %> | |
<%= media.hidden_field :key %> | |
<% end %> | |
</div> | |
<div class="actions"> |
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
<section class="C-full lg"> | |
<header> | |
<%= back_button "#" %> | |
<h1>New Screen</h1> | |
</header> | |
<div class="C-cont"> | |
<article> | |
<%= render 'form' %> | |
</article> | |
<aside> |
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
icons = Hash.new | |
@vehicles.each do |v| | |
if !v.latest_position.nil? | |
icon = v.icon_id || 0 | |
heading = v.latest_position.heading | |
if icons.has_key?(icon) | |
if icons[icon].has_key?(heading) | |
icons[icon][heading].push(v) | |
else | |
icons[icon][heading] = [v] |
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
$("#ul.checkboxlist").find("input[type='checkbox']").live('click', function(){ | |
// something to update the invoice here | |
console.log($(this).val()); //Should have the value of the checkbox that was clicked | |
}); |
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
// Each table is an array [] of objects. | |
// Object MUST have all keys. | |
// Objects with matching keys will be merged into one object. | |
function merge(table1, table2){ | |
keys = ['key', 'note']; | |
var merged = table1; | |
for(i in merged){ | |
var obj1 = merged[i]; | |
for(j in table2){ | |
var obj2 = table2[j]; |
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
# Get level name of a membership | |
def level_name | |
name = (Membership::LEVELS.respond_to?(:key) ? Membership::LEVELS.key(level) : Membership::LEVELS.index(level)) | |
name.to_s.humanize | |
end |
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
<VirtualHost *:80> | |
ServerName istaylorswiftsingle.com | |
DocumentRoot /var/www/istaylorswiftsingle | |
<Directory /var/www/istaylorswiftsingle> | |
Allow from all | |
Options -MultiViews | |
</Directory> | |
</VirtualHost> |
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
{ | |
"geocoded_waypoints" : [ | |
{ | |
"geocoder_status" : "OK", | |
"place_id" : "Ei02NS05OSBQYXVsIEFtaWNvIFdheSwgU2VjYXVjdXMsIE5KIDA3MDk0LCBVU0E", | |
"types" : [ "street_address" ] | |
}, | |
{ | |
"geocoder_status" : "OK", | |
"place_id" : "ChIJFziVmP33wokRRu0dx8XBfUE", |
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
{ | |
"html_attributions" : [], | |
"results" : [ | |
{ | |
"formatted_address" : "101 Plaza Center, Secaucus, NJ 07094, United States", | |
"geometry" : { | |
"location" : { | |
"lat" : 40.79164149999999, | |
"lng" : -74.0568873 | |
}, |
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
<style id="jsbin-css"> | |
/* Always set the map height explicitly to define the size of the div | |
* element that contains the map. */ | |
#map { | |
height: 100%; | |
} | |
/* Optional: Makes the sample page fill the window. */ | |
html, body { | |
height: 100%; | |
margin: 0; |
OlderNewer