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
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')
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

Separar em helpers

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

  <div>
 &lt;%= container.image_upload %&gt;