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
class CreateStuffs < ActiveRecord::Migration | |
def self.up | |
create_table :stuffs, :primary_key => :cod do |t| | |
t.integer :cod | |
t.integer :stuff_type_id | |
t.timestamps | |
end | |
end |
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
class Posts < Application | |
provides :xml, :json | |
def index | |
@posts = Post.all | |
display @posts | |
end | |
end | |
#Este controller responde solicitações em html, xml, e json :) |
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
class Class | |
def sets_gets(*args) | |
args.each do |arg| | |
define_method(arg) { eval "@#{arg}" } | |
define_method("#{arg}=".to_sym) { |param| eval "@#{arg}=param" } | |
end | |
end | |
end | |
class Person |
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
Testing Gist-vim plugin... |
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
$(function(){ | |
setExternalLinks(); | |
configureModalDialog(); | |
flashMessages(); | |
configInputs(); | |
}); | |
// by Catón |
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
public/items/0000/1/filename.jpg | |
public/items/0000/1/filename_thumb.jpg | |
public/system/items/1/original/filename.jpg | |
public/system/items/1/thumb/filename.jpg |
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
$ rvm install jruby-head | |
jruby-head - #fetching | |
error: pathspec 'ruby_1_head_head' did not match any file(s) known to git. | |
fatal: Couldn't find remote ref ruby_1_head_head | |
There has been an error while checking out branch ruby_1_head_head. | |
Halting the installation. | |
There has been an error while trying to fetch the source. | |
Halting the installation. |
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
$ rvm install jruby-head | |
jruby-head - #fetching | |
Cloning from git://github.com/jruby/jruby.git, this may take a while depending on your connection... | |
Cloning into /Users/lucascaton/.rvm/repos/jruby-head... | |
remote: Counting objects: 31424, done. | |
remote: Compressing objects: 100% (14989/14989), done. | |
remote: Total 31424 (delta 21024), reused 24309 (delta 14939) | |
Receiving objects: 100% (31424/31424), 44.22 MiB | 577 KiB/s, done. | |
Resolving deltas: 100% (21024/21024), done. |
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
[ree-1.8.7-2011.03]~/projects/code/ruby/pessoais/golks(working*)$ rspec spec/integration/users/users_spec.rb -l 20 | |
`include Capybara` is deprecated please use `include Capybara::DSL` instead. | |
`include Capybara` is deprecated please use `include Capybara::DSL` instead. | |
`include Capybara` is deprecated please use `include Capybara::DSL` instead. | |
Run filtered using {:line_number=>20} | |
Users management | |
Trying sign in with a not confirmed user account (FAILED - 1) | |
Failures: |
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
require "xpath" # XPath is a separate gem now | |
module Cucumber | |
module Rails | |
module CapybaraSelectDatesAndTimes | |
def select_date(field, options = {}) | |
date = Date.parse(options[:with]) | |
selector = %Q{.//fieldset[contains(./legend, "#{field}")]} | |
within(:xpath, selector) do | |
find(:xpath, '//select[contains(@id, "_1i")]').find(:xpath, ::XPath::HTML.option(date.year.to_s)).select_option |
OlderNewer