Skip to content

Instantly share code, notes, and snippets.

View rbrancher's full-sized avatar

Rodrigo Brancher rbrancher

  • Amazon
  • Seattle, WA - USA
View GitHub Profile
seção atual categoria atual -> nova seção novo canal
PROJECTS edifício -> ARQUITETURA comercial
PROJECTS casa -> ARQUITETURA residencial
PROJECTS apto -> ARQUITETURA residencial
PROJECTS loja -> ARQUITETURA comercial
PROJECTS office -> ARQUITETURA comercial
PROJECTS club -> ARQUITETURA comercial
PROJECTS eat -> ARQUITETURA comercial
PROJECTS urban -> ARQUITETURA urbanismo
PROJECTS hotel -> ARQUITETURA hotel
<article class="store-product-show">
<section class="gallery-block">
<div class="gallery">
<%- product.catalog_product.images.each do |image| -%>
<%= image_tag image.grid_6.url, alt: product.name %>
<%- end -%>
</div>
<div class="text-block">
<%= simple_format product.catalog_product.tech_description %>
<dl class="field">
<dt>status</dt>
<dd><%= f.radio_button :published, false %><%= f.label :published, " #{t('publisher.draft')}", :value => false %></dd>
<dd><%= f.radio_button :published, true %><%= f.label :published, " #{t('publisher.published')}", :value => true %></dd>
</dl>
<dl class="field">
<dt><%= f.label :published_at %></dt>
<dd>
<%= f.text_field :published_at, value: object.published_at.try(:strftime, '%d/%m/%Y'), class: 'datepicker' %>
</dd>
server {
listen 80;
listen 443;
server_name lumini.com.br www.lumini.com.br lumini-app-874277573.us-east-1.elb.amazonaws.com 107.22.255.53 ec2-174-129-157-250.compute-1.amazonaws.com;
charset utf-8;
root /home/ubuntu/rails_apps/lumini.com.br/current/public;
<ul class="mmagick-entries">
</ul>
<%= render '/reference_input' if media_types[:reference] %>
<%= render '/upload_input' if media_types[:upload] %>
# reference_input
<div class="mmagick-references-queue">
@rbrancher
rbrancher / gist:4252859
Created December 10, 2012 19:47
helper
def mmagick_container(model, relation, media_types = {upload: true, reference: false}, options = {})
data = data_attributes(model, relation, options)
id = "#{model.class.to_s.downcase}-#{relation.to_s}"
classes = "mmagick-wrapper #{relation.to_s}"
content_tag 'div', id: id, class: classes, data: data do
if block_given?
yield
else
render '/wrapper_content', partial_attributes(model, relation, media_types, options)

Separar em helpers

<%= attachment_container @album, :photos do |container| %>
  <div>
    <%= container.video_upload %>
  </div>

  <div>
 &lt;%= container.image_upload %&gt;
var VimeoPlayer = function (player_id) {
this.player = document.getElementById(player_id);
this.player_ready = false;
this.play_when_ready = false;
this.play = function () {
if (this.player_ready !== true) {
this.play_when_ready = true;
}
this.command('play');
<div id="video_block" class="field-group grid_24 <%= "hidden" unless @item.type == 'video' %>">
<h2><%= t('publisher.video') %></h2>
<%= f.text_field :video_source %>
<%= attachment_container_for_video @item, :videos %>
</div>
// SERVER
Meteor.startup(function () {
// code to run on server at startup
Coords = new Meteor.Collection("coords");
Meteor.publish('coords', function () {
return Coords.find();
});
});