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
sudo apt-get install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev | |
sudo apt-get install sqlite3 libsqlite3-dev libsqlite3-ruby1.9.1 | |
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm) |
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
Started GET "/h/ajax_notifications?time=1315099321571" for 127.0.0.1 at 2011-09-03 22:22:01 -0300 | |
Processing by HomeController#ajax_notifications as HTML | |
Parameters: {"time"=>"1315099321571"} | |
User Load (3.7ms) SELECT "users".* FROM "users" WHERE "users"."id" = 3 LIMIT 1 | |
SQL (1.8ms) SELECT COUNT(*) FROM "post_user_news" WHERE "post_user_news"."is_read" = 'f' AND ("post_user_news".user_id = 3) | |
PostUserNews Load (2.2ms) SELECT post_id, reason_why, reason_trigger, max(user_id_from) as user_id_from, max(created_at) as created_at, count(*) FROM "post_user_news" WHERE ("post_user_news".user_id = 3) AND (post_id IS NOT NULL) GROUP BY post_id, reason_why, reason_trigger ORDER BY created_at DESC LIMIT 6 | |
Exist fragment? views/ajax_news/unread/0/md5/f11abefe3abe360db37213db1fa93b0c (0.3ms) | |
Read fragment views/ajax_news/unread/0/md5/f11abefe3abe360db37213db1fa93b0c (0.1ms) | |
Rendered home/ajax_notifications.html.erb (5.0ms) | |
Completed 200 OK in 644ms (Views: 9.2ms | ActiveRecord: 20.0ms) |
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
class ApplicationController < ActionController::Base | |
protect_from_forgery | |
helper_method :is_manager?, :current_cart, :cc | |
protected | |
def current_cart | |
@current_cart ||= session[:cart_key] ? Cart.where(w).first : Cart.new | |
end |
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
module UserModuleKeyValueStore | |
def self.included(base) | |
base.extend ClassMethods | |
base.class_eval do | |
after_save :kv_save | |
end | |
end | |
module ClassMethods |
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
NoMethodError in Devise::RegistrationsController#new | |
undefined method `new_with_session' for #<Class:0xb2b59fc> | |
Rails.root: /home/usuario/apps/ex2 | |
Application Trace | Framework Trace | Full Trace | |
app/controllers/devise/registrations_controller.rb:71:in `build_resource' | |
app/controllers/devise/registrations_controller.rb:8:in `new' |
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
Finance::Account Load (0.2ms) SELECT "finance_accounts".* FROM "finance_accounts" LIMIT 2 | |
Finance::Balance Load (0.3ms) SELECT "finance_balances".* FROM "finance_balances" WHERE ("finance_balances".account_id = 298486374) AND ("finance_balances"."money_type" = 'BRL') LIMIT 1 | |
Finance::Account Load (0.2ms) SELECT "finance_accounts".* FROM "finance_accounts" WHERE ("finance_accounts"."id" = 298486374) LIMIT 1 | |
Finance::Balance Load (0.2ms) SELECT "finance_balances"."id" FROM "finance_balances" WHERE ("finance_balances"."money_type" = 'BRL') AND ("finance_balances"."account_id" = 298486374) LIMIT 1 | |
Finance::Balance Load (0.3ms) SELECT "finance_balances".* FROM "finance_balances" WHERE ("finance_balances".account_id = 298486374) AND ("finance_balances"."money_type" = 'BRL') LIMIT 1 | |
Finance::Balance Load (0.2ms) SELECT "finance_balances".* FROM "finance_balances" WHERE ("finance_balances".account_id = 980190962) AND ("finance_balances"."money_type" = 'BRL') LIMIT 1 | |
Finance::Account Load (0.1ms) |
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
r3@r3:~/apps/nc$ | |
r3@r3:~/apps/nc$ ruby -I"lib:test" "/home/r3/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/unit/user_session_test.rb" "test/unit/helpers/home_helper_test.rb" "test/unit/helpers/site_helper_test.rb" "test/unit/helpers/user_sessions_helper_test.rb" "test/unit/helpers/users_helper_test.rb" "test/unit/helpers/payment_notifications_helper_test.rb" "test/unit/helpers/finance/accounts_helper_test.rb" "test/unit/helpers/finance/balances_helper_test.rb" "test/unit/helpers/finance/transfers_helper_test.rb" "test/unit/helpers/categories_helper_test.rb" "test/unit/helpers/payment_redirection_helper_test.rb" "test/unit/helpers/artists_helper_test.rb" "test/unit/finance/transfer_test.rb" "test/unit/finance/account_test.rb" "test/unit/finance/balance_test.rb" "test/unit/user_test.rb" "test/unit/payment_notification_test.rb" "test/unit/category_test.rb" | |
Loaded suite /home/r3/.rvm/gems/ruby-1.9.2-p0/gems/rake-0.8.7/lib/rake/rake_test_loader | |
Started | |
.F...... | |
Finished in 0.51 |
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
#index.html view file | |
"now it works, I'm passing an string " | |
<%= tabs 1000 do |t| %> | |
<% content = capture do %> | |
aaa | |
<% end %> |
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
the problem is that yield(instance) is yielding the currenct action (index) and it should add methods to the helper method scope | |
index.html | |
<%= tabs 1000 do |t| %> | |
<% t.tab "Tab1" do %> | |
aaa |
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
Started GET "/1704/ajax_tab_data/1" for 201.14.42.220 at 2011-01-11 16:05:11 -0800 | |
Processing by UsersController#ajax_show_tab_data as */* | |
Parameters: {"id"=>"1704", "tab_id"=>"1"} | |
Rendered users/ajax_show_tab_data.html.erb (5.8ms) | |
Completed 200 OK in 9ms (Views: 4.0ms | ActiveRecord: 3.6ms) | |
Started GET "/1713/ajax_relation" for 186.215.92.3 at 2011-01-11 16:05:11 -0800 | |
Processing by UsersController#ajax_show_relation as JS | |
Parameters: {"id"=>"1713"} |