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
lite@lite-debian:~$ irb | |
ruby-1.9.2-p0 > class C; end | |
=> nil | |
ruby-1.9.2-p0 > c = C.new | |
=> #<C:0x00000000becdf0> | |
ruby-1.9.2-p0 > c.method | |
ArgumentError: wrong number of arguments(0 for 1) | |
from (irb):3:in `method' | |
from (irb):3 | |
from /home/lite/.rvm/rubies/ruby-1.9.2-p0/bin/irb:16:in `<main>' |
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
# ActiveRecord::ConnectionAdapters::Mysql2IndexDefinition | |
module ActiveRecord | |
module ConnectionAdapters | |
class Mysql2IndexDefinition | |
def case_sensitive? | |
false | |
end | |
end | |
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
# File net/pop.rb, line 410 | |
def initialize(addr, port = nil, isapop = false) | |
@address = addr | |
@ssl_params = POP3.ssl_params | |
@port = port | |
@apop = isapop | |
@command = nil | |
@socket = nil | |
@started = false |
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
dd780fc2 (johan pretorius 2010-10-04 12:13:12 +0200 148) if (admin? or current_user.tf_admin?) and @channel_user | |
4315fa78 (johan pretorius 2010-01-24 20:00:54 +0200 149) redirect_to :controller => :channel_users, :action => 'index' | |
dd780fc2 (johan pretorius 2010-10-04 12:13:12 +0200 150) elsif (admin? or current_user.tf_admin?) | |
dd780fc2 (johan pretorius 2010-10-04 12:13:12 +0200 151) redirect_to :controller => :accounts, :action => 'show' | |
bea746b9 (Johannes Fahrenkrug 2009-03-27 16:39:08 +0100 152) else | |
bea746b9 (Johannes Fahrenkrug 2009-03-27 16:39:08 +0100 153) redirect_to :action => 'edit', :id => @user.id | |
bea746b9 (Johannes Fahrenkrug 2009-03-27 16:39:08 +0100 154) end | |
bea746b9 (Johannes Fahrenkrug 2009-03-27 16:39:08 +0100 155) else | |
bea746b9 (Johannes Fahrenkrug 2009-03-27 16:39:08 +0100 156) render :action => 'edit' |
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
FIELDS = [:about_url, :feedback_url, :terms_of_service_url, :privacy_policy_url, :support_url, :contact_url] | |
self.with_options(:with => /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix ) do |url| | |
FIELDS.each do |field| | |
url.validates_format_of field, :if => lambda{ |val| !val.send(field).blank? } | |
end | |
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
<% f.with_options :class => "rounded_field" do |opt| %> | |
<%= opt.text_field :twitter_api %> | |
<br /> <br /> | |
<%= opt.text_field :facebook_api %> | |
<br /> <br /> | |
<%= opt.text_field :feedback_url %> | |
<% 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
NoMethodError: undefined method `length' for nil:NilClass | |
from /opt/rails/tweetscreener/releases/20101117090454/app/models/post.rb:111:in `body_length' | |
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/callbacks.rb:178:in `send' | |
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/callbacks.rb:178:in `evaluate_method' | |
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/callbacks.rb:166:in `call' | |
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/callbacks.rb:90:in `run' | |
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/callbacks.rb:90:in `each' | |
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/callbacks.rb:90:in `send' | |
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/callbacks.rb:90:in `run' | |
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/callbacks.rb:276:in `run_callbacks' |
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
# -*- encoding: utf-8 -*- | |
module Textual | |
def to_ascii | |
foo = self.downcase.strip | |
foo.gsub!(/[ĄÀ�?ÂÃâäàãáäå�?ăąǎǟǡǻ�?ȃȧẵặ]/,'a') | |
foo.gsub!(/[Ęëêéèẽēĕėẻȅȇẹȩęḙḛ�?ếễểḕḗệ�?]/,'e') | |
foo.gsub!(/[Ì�?ÎĨ�?iìíîĩīĭïỉ�?ịįȉȋḭɨḯ]/,'i') | |
foo.gsub!(/[ÒÓÔÕÖòóôõ�?�?ȯö�?őǒ�?�?ơǫ�?ɵøồốỗổȱȫȭ�?�?ṑṓ�?ớỡởợǭộǿ]/,'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
module ActiveRecord | |
module ConnectionAdapters | |
class Mysql2Adapter | |
def truncate_table(table_name) | |
execute("TRUNCATE TABLE #{quote_table_name(table_name)};") | |
end | |
end | |
end | |
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
@pages = Page.paginate :page => params[:page], | |
:order => 'created_at DESC', | |
:conditions => ['user_profile_id = ?', nil] |