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
td = @vote_types[@resolution.votes.where(:member_id => n).first.vote_type_id - 1].name |
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
Hangman and Mastermind |
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
Hangman and Mastermind |
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
➜ rwsampleapp rails c | |
Loading development environment (Rails 3.2.6) | |
[1] pry(main)> require "capybara/rails" | |
=> true | |
[2] pry(main)> require "capybara_minitest_spec" | |
=> false | |
[3] pry(main)> require "minitest/autorun" | |
=> true | |
[4] pry(main)> include Rails.application.routes.url_helpers | |
=> Object |
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
➜ sample_app git:(sign-up) ✗ rails c | |
Loading development environment (Rails 3.2.6) | |
irb(main):001:0> require "capybara/rails" | |
=> true | |
irb(main):002:0> include Capybara::DSL | |
=> Object | |
irb(main):003:0> include Rails.application.routes.url_helpers | |
=> Object | |
irb(main):005:0> visit signup_path | |
=> nil |
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 "rubygems" | |
require "google_spreadsheet" | |
# Logs in. | |
# You can also use OAuth. See document of GoogleSpreadsheet.login_with_oauth for details. | |
session = GoogleSpreadsheet.login(login, password) | |
# First worksheet of http://spreadsheets.google.com/ccc?key=pz7XtlQC-PYx-jrVMJErTcg&hl=en | |
ws = session.spreadsheet_by_key(dockey).worksheets[0] |
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 "rubygems" | |
require "google_spreadsheet" | |
# Logs in. | |
# You can also use OAuth. See document of GoogleSpreadsheet.login_with_oauth for details. | |
session = GoogleSpreadsheet.login(login, password) | |
# First worksheet of http://spreadsheets.google.com/ccc?key=pz7XtlQC-PYx-jrVMJErTcg&hl=en | |
ws = session.spreadsheet_by_key(dockey).worksheets[0] | |
#puts ws.rows[1] |
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
# Helper methods defined here can be accessed in any controller or view in the application | |
Emparse.helpers do | |
def logindata(login, password, spreadkey) | |
session = GoogleSpreadsheet.login(login, password) | |
ws = session.spreadsheet_by_key(spreadkey).worksheets[0] | |
fname = [] | |
lname = [] | |
address = [] | |
for row in 2..ws.num_rows |
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
[root@dev /var/www/jasonwong]# script/console RAILS_ENV=production | |
Loading RAILS_ENV=production environment (Rails 2.2.2) | |
/opt/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:340:in `read':Errno::ENOENT: No such file or directory - /var/www/jasonwong/config/environments/RAILS_ENV=production.rb | |
/var/www/jasonwong/app/controllers/application.rb:9:NoMethodError: undefined method `auto_include!' for ApplicationController:Class | |
>> Asset | |
ActiveRecord::ConnectionNotEstablished: ActiveRecord::ConnectionNotEstablished | |
from /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in `retrieve_connection' | |
from /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:121:in `retrieve_connection' | |
from /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:113:in `connectio |
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
NoMethodError in Admin/overview#index | |
Showing admin/overview/_comment_event.rhtml where line #8 raised: | |
undefined method `-' for {:length=>100}:Hash | |
Extracted source (around line #8): | |
5: | |
6: <span class="event-time"><%= event_time_for event, later %></span> |