Displaying 3 results from an estimated 3 matches for "set_readonly_opt".
2006 Aug 09
7
changing find method
Hi,
i was wondering if there was a nice clean way(after all, it is ruby) to 
change the find method of a certain model/class (Page) so that if i 
wanted to use a find method on a @page instance it would return only 
specific rows from the table(if the page.published == true/false:
the pages table looked like
SQL:
...
id int not null auto_increment,
published tinyint(1) not null,
something
2006 Aug 07
0
Overloading ''find''
...xcellent help on mixins for my classes using lib/, but it 
doesn''t allow find to be overloaded. I''m testing with the example method 
below:
module myModule
      def find(*args)
         options = extract_options_from_args!(args)
         validate_find_options(options)
         set_readonly_option!(options)
         case args.first
           when :first then find_initial(options)
           when :all   then find_every(options)
           else             find_from_ids(args, options)
         end
         find_initial(options)
       end
end
So it will always return the initial data. I...
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