Skip to content

Instantly share code, notes, and snippets.

@tarcieri
Created October 5, 2009 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tarcieri/202477 to your computer and use it in GitHub Desktop.
Save tarcieri/202477 to your computer and use it in GitHub Desktop.
$ script/console
Loading development environment (Rails 2.3.4)
>> c = Channel.find(:first)
=> #<Channel id: 2, created_at: "2009-06-26 18:08:08", updated_at: "2009-06-26 18:08:08", feed_id: nil, feed_index: nil, title: "My Videos", link: nil, producer_id: 2>
>> c.link
NoMethodError: Attempt to call private method
from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/attribute_methods.rb:236:in `method_missing'
from (irb):5
>> c.send :link
ArgumentError: wrong number of arguments (1 for 2)
from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1094:in `link'
from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1094:in `link'
from (irb):6:in `send'
from (irb):6
>> c.attributes[:link]
=> nil
>> c.method :link
=> #<Method: Channel(RakeFileUtils)#link>
>> c.class.ancestors
=> [Channel(id: integer, created_at: datetime, updated_at: datetime, feed_id: integer, feed_index: integer, title: string, link: text, producer_id: integer), Imageable, Taggable, Lysis::ChannelExport, Models::Base(abstract), ActiveRecord::Base, ActiveRecordPermissions::Permissions, ActiveRecordPermissions::ModelUserAccess::Model, Authlogic::ActsAsAuthentic::ValidationsScope, Authlogic::ActsAsAuthentic::SingleAccessToken, Authlogic::ActsAsAuthentic::SessionMaintenance, Authlogic::ActsAsAuthentic::RestfulAuthentication::InstanceMethods, Authlogic::ActsAsAuthentic::RestfulAuthentication, Authlogic::ActsAsAuthentic::PersistenceToken, Authlogic::ActsAsAuthentic::PerishableToken, Authlogic::ActsAsAuthentic::Password, Authlogic::ActsAsAuthentic::MagicColumns, Authlogic::ActsAsAuthentic::Login, Authlogic::ActsAsAuthentic::LoggedInStatus, Authlogic::ActsAsAuthentic::Email, Authlogic::ActsAsAuthentic::Base, ActiveRecord::Aggregations, ActiveRecord::Transactions, ActiveRecord::Reflection, ActiveRecord::Batches, ActiveRecord::Calculations, ActiveRecord::Serialization, ActiveRecord::AutosaveAssociation, ActiveRecord::NestedAttributes, ActiveRecord::Associations, ActiveRecord::AssociationPreload, ActiveRecord::NamedScope, ActiveRecord::Callbacks, ActiveRecord::Observing, ActiveRecord::Timestamp, ActiveRecord::Dirty, ActiveRecord::AttributeMethods, ActiveRecord::Locking::Optimistic, ActiveRecord::Locking::Pessimistic, ActiveSupport::Callbacks, ActiveRecord::Validations, Object, Mocha::ObjectMethods, PP::ObjectMixin, RakeFileUtils, FileUtils, FileUtils::StreamUtils_, RequireAll, JSON::Ext::Generator::GeneratorMethods::Object, ActiveSupport::Dependencies::Loadable, InstanceExecMethods, Base64::Deprecated, Base64, Kernel]
>> c.class.ancestors.include? RakeFileUtils
=> true
>> ActiveRecord::Base.include? RakeFileUtils
=> true
>> c.link
=> nil
>> c.method :link
=> #<Method: Channel#link>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment