Skip to content

Instantly share code, notes, and snippets.

View marcelojunior's full-sized avatar

Marcelo Júnior marcelojunior

View GitHub Profile
<template>
<md-layout>
<md-card>
<md-table>
<md-table-header>
<md-table-row>
<md-table-head v-for="campo in campos" :key="campo.nome">{{ campo.descricao }}</md-table-head>
</md-table-row>
</md-table-header>
<md-table-body>
Started POST "/manager/themed_campaigns" for 127.0.0.1 at 2015-04-13 18:17:17 -0300
Processing by Manager::ThemedCampaignsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"LrAX3l2AwWyhRzkq5RUajlsIcXlU0g/ADJBegKZDeyU=", "manager_ad_themed_campaign"=>{"title"=>"Dia das mães", "subdomain"=>"diadasmaes", "description"=>"Página do dia das maes", "date_start(3i)"=>"13", "date_start(2i)"=>"4", "date_start(1i)"=>"2015", "date_end(3i)"=>"13", "date_end(2i)"=>"4", "date_end(1i)"=>"2017", "active"=>"true", "color1"=>"#f17420", "color2"=>"#16556a", "color3"=>"#898b8d", "img_bg_cache"=>"", "img_bg"=>#<ActionDispatch::Http::UploadedFile:0x007feb7bde3938 @tempfile=#<Tempfile:/var/folders/2v/f7hxln6x29gcq8xlkj5fgmwh0000gn/T/RackMultipart20150413-14849-3uartp>, @original_filename="banner-home-diadobeijo.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"manager_ad_themed_campaign[img_bg]\"; filename=\"banner-home-diadobeijo.jpg\"\r\nContent-Type: image/jpeg\r\n">, "im
# Models
class Manager::Ad::ThemedCampaign < ActiveRecord::Base
has_and_belongs_to_many :products
accepts_nested_attributes_for :products, reject_if: :all_blank, allow_destroy: true
end
class Manager::Ad::Product < ActiveRecord::Base
has_and_belongs_to_many :themed_campaigns
end
'use strict'
describe 'Controller: ClientsIndexCtrl', ->
beforeEach module 'projeto1'
ClientsIndexCtrl = {}
scope = {}
# Initialize the controller and a mock scope
Failures:
1) Controller: ClientsIndexCtrl encountered a declaration exception
Message:
TypeError: object is not a function
Stacktrace:
TypeError: object is not a function
at [object Object].<anonymous> (/Users/marcelo/projetos/projeto1/spec/javascripts/projeto_specs/controllers/clients/index.coffee:5:16)
at Object.<anonymous> (/Users/marcelo/projetos/projeto1/spec/javascripts/projeto_specs/controllers/clients/index.coffee:3:3)
at Object.<anonymous> (/Users/marcelo/projetos/projeto1/spec/javascripts/projeto_specs/controllers/clients/index.coffee:19:4)
'use strict'
describe 'Controller: ClientsIndexCtrl', ->
beforeEach module 'belasis'
ClientsIndexCtrl = {}
scope = {}
# Initialize the controller and a mock scope
@marcelojunior
marcelojunior / gist:3708804
Created September 12, 2012 18:19
Inflections PT-BR Rails
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format
# (all these examples are active by default):
# ActiveSupport::Inflector.inflections do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1'
# inflect.irregular 'person', 'people'
# inflect.uncountable %w( fish sheep )
# end
@marcelojunior
marcelojunior / gist:3648273
Created September 6, 2012 00:05
Reconfigurar senha do usuário ROOT do MySQL
/etc/init.d/mysqld stop
/etc/init.d/mysqld start -–skip-grant-tables
mysqladmin -u root password 'root'
mysqladmin flush-privileges
Syntax error: Invalid CSS after "(": expected variable (e.g. $foo), was "!color)"
on line 7 of /home/marcelo/hueb/presenteio/app/sass/partials/_utilities.sass
from line 9 of /home/marcelo/hueb/presenteio/app/sass/partials/_base.sass
from line 2 of /home/marcelo/hueb/presenteio/app/sass/public.sass
2: =graydient
3: +linear-gradient(color-stops(#fff, #CFCFCF))
4: :-ms-filter "progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#FFFFFF, endColorstr=#CFCFCF)" /* IE8 */
5: :filter progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#FFFFFF, EndColorStr=#CFCFCF) /* IE6 & IE7 */
6: