<%= attachment_container @album, :photos do |container| %>
<div>
<%= container.video_upload %>
</div>
<div>
<%= container.image_upload %>
This file contains hidden or 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
require 'spec_helper' | |
describe 'publications/index' do | |
describe 'title' do | |
before do | |
%w(authors medias countries dates publications).each { |var| assign(var, []) } | |
end | |
it 'should set with author name' do | |
assign(:author, 'agnaldo farias') |
This file contains hidden or 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
SitemapGenerator::Sitemap.default_host = 'http://leonardofinotti.com' | |
SitemapGenerator::Sitemap.create do | |
add root_path, changefreq: 'daily', priority: 1.0 | |
add about_path, changefreq: 'monthly', priority: 0.9 | |
# Projects | |
Project.published.each do |project| | |
add project_path(project), priority: 0.8, changefreq: 'weekly', lastmod: project.updated_at |
This file contains hidden or 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
def luz_e_forma_filters_path(params) | |
path = "/luz_e_forma" | |
path << "/" << params[:filters][:use] ? "all_uses" : params[:filters][:use] | |
path << "/" << params[:filters][:application] ? "all_applications" : params[:filters][:application] | |
path << "/" << params[:filters][:lamp] ? "all_lamps" : params[:filters][:lamp] | |
path << "/" << params[:filters][:designer] ? "all_designers" : params[:filters][:designer] | |
path << "/" << params[:filters][:manufacturer] ? "all_manufacturers" : params[:filters][:manufacturer] | |
path | |
end |
This file contains hidden or 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
// SERVER | |
Meteor.startup(function () { | |
// code to run on server at startup | |
Coords = new Meteor.Collection("coords"); | |
Meteor.publish('coords', function () { | |
return Coords.find(); | |
}); | |
}); |
This file contains hidden or 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
<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> |
This file contains hidden or 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
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'); |
This file contains hidden or 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
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) |
This file contains hidden or 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 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"> |
This file contains hidden or 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
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; |
OlderNewer