Displaying 6 results from an estimated 6 matches for "protected_methods".
2006 Mar 12
2
Find all the methods on a object in an irb session?
How can I find all the methods on an object from withing irb?
Thanks,
Joe
2006 Jul 05
2
Serialized object behaves weird
Hi!
I got a class named EinsatzFilter which I serialized to session. Before
saving to session it works afterwards I keep getting the message:
"undefined method `to_s'' for #<Person:0x38c6ab8>". "Person" is a from
ActiveRecord::Base inherited class.
Code:
class EinsatzFilter
include ApplicationHelper
attr_reader :personen, :monat, :projekte, :kunde
2007 Sep 14
4
Refactoring ActiveRecord's private methods
As it currently stands, ActiveRecord has alot of private and protected
methods in the Base class.
>> ActiveRecord::Base.methods.size
=> 427
>> ActiveRecord::Base.protected_methods.size
=> 32
>> ActiveRecord::Base.private_methods.size
=> 193
I really loved the suggestion by Courtenay in Refactoring
AR::Base.find (http://groups.google.com/group/rubyonrails-core/
browse_thread/thread/2ff2b3ce6732096f/776dae05ffa2d445). It not only
makes extending find calls easier,...
2006 Jun 30
6
RSS::Parser Documentation
Hi
I am trying to use the RSS classes from "rss/2.0" and everything works
but I want to know what attributes and properties I can get at from each
of the classes I am getting back.
For example, the class has a "channel" which I can tell has a "title"
attribute (because it works when I query it :) but I would really like a
list of every attribute that is
2005 Dec 27
3
myObject.send(column.name) from Agile Development book
I''m studying the Agile Development with Rails book. In the chapter that
first sets up the depot application (page 68), there is this bit of code
from a view:
<% for product in @products %>
<tr>
<% for column in Product.content_columns %>
<td><%=h product.send(column.name) %></td>
<% end %>
etc...
I am trying to absorb both Ruby and
2005 Mar 09
21
Converting time retrieved from MySQL
I''m having a problem converting a date retrieved from my MySQL database
and I''m hoping someone can help.
MySQL stores the date/time as this:
2005-03-08 17:00:34.0
and according to my Pickaxe book Ruby stores times as "the number of
seconds and microseconds since [...] January 1, 1970". All well and good.
Unfortunately, RoR is converting my date to this: