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
$(document).on 'ready page:load', -> | |
$(".super-div").on( "click", ".addition .label i"), -> | |
alert("TADAAAAA") |
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
# Dicas: | |
# Nós criamos sempre um namespace, exemplo: RC.Permissions | |
# Colocados tudo em classe: class PRC.Permissions | |
# Quase nunca fazemos bind no document | |
class PRC.Permissions | |
constructor: -> | |
@$visitPermissions = $(".visit-permissions") | |
@visitId = @$visitPermissions.data("visitId") |
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
$(document).on 'ready page:load', -> | |
# Lots of code goes here... | |
$(document).on 'click', '.addition .label i', (e) -> | |
console.log ".addition .label i 'click' fired! id : " + $(this).closest('.addition').data 'id' | |
# Lots of code goes here... | |
# Discussão: |
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
<body> | |
<nav role="navigation"> | |
<ul> | |
<% Rails.configuration.menu.each do |item| %> | |
<li><%= link_to(item.title, item.url, target: item.target) %> | |
<% end %> | |
</ul> | |
</nav> | |
</body> |
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
.navbar-inverse.navbar-static-top | |
link_to "This is a button", "#", class: "btn btn-primary" |
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
.main-navigation | |
link_to "This is a button", "#", class: "button" |
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
.button | |
@extend .btn | |
@extend .btn-default | |
.main-navigation | |
@extend .navbar-inverse | |
@extend .navbar-static-top |
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
source 'http://rubygems.org' | |
gem 'rails', '~> 3.1.0' | |
gem 'rack', '1.3.3' | |
# Rails extensions | |
gem 'derail', git: 'git://github.com/sj26/derail.git' | |
# PostgreSQL is for winners! |