This file contains 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
➜ smsy git:(master) ✗ rails s | |
=> Booting WEBrick | |
=> Rails 3.1.0.rc4 application starting in development on http://0.0.0.0:3000 | |
=> Call with -d to detach | |
=> Ctrl-C to shutdown server | |
[2011-06-22 13:34:39] INFO WEBrick 1.3.1 | |
[2011-06-22 13:34:39] INFO ruby 1.9.2 (2011-02-18) [x86_64-darwin10.7.0] | |
[2011-06-22 13:34:39] INFO WEBrick::HTTPServer#start: pid=60275 port=3000 | |
This file contains 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
# encoding: utf-8 | |
class Ability | |
include CanCan::Ability | |
def initialize(user) | |
user ||= User.new # guest | |
user.roles.each do |role| | |
role.permissions.each do |permission| | |
if permission.subject_class == 'all' |
This file contains 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
module ApplicationHelper | |
def jsubmit_button(value = "Confirm", options = {}) | |
content_for :head do | |
javascript_tag "$(function() { | |
$( '#jsubmit_button').button({ | |
icons: { | |
primary: \"ui-icon-check\" | |
}, | |
text: true |
This file contains 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
# Trace is a model in vendor/plugins/mylogger/lib/app/models/trace.rb | |
# vendor/plugins/mylogger/lib/mylogger.rb | |
#... | |
module MyLoggerImpl | |
def self.trace(controller_instance) | |
puts 'Tracing' |
This file contains 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
Replace the SHAs and author with your own. | |
git log --numstat --pretty="%H" --author="eduardo.a20" 8e03890e494a25e7706c80c38e89858c887d436d..052ff1202e0326c9588531d234b30269bd8056f8 | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d, -%d\n", plus, minus)}' |
This file contains 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
'use strict'; | |
portalServidorApp.controller('UnidadeController', ['$scope', 'resolvedUnidade', 'Unidade', | |
function ($scope, resolvedUnidade, Unidade) { | |
$scope.unidades = resolvedUnidade; | |
$scope.create = function () { | |
Unidade.save($scope.unidade, | |
function () { |
NewerOlder