Displaying 4 results from an estimated 4 matches for "class_inheritable_accessor".
2011 May 28
0
class_inheritable_accessor => class_attribute
I had code
class_inheritable_accessor :attrs, :instance_reader =>
false, :instance_writer => false
self.attrs = {}
now i want to get rid of class_inheritable_accessor, but
class_attribute only supports instance_writer, not instance_reader
options and i really don''t want instance reader. Is there any way to
do it?
--
Y...
2008 Mar 03
0
A kind of monkey patch and an invitation for criticism for all you (who know this stuff better than I do)
...ppets.dzone.com/posts/show/1799
But I wanted to generalize this a little to automatically include
whatever helper modules are included in the views. So I dreamt up 35
lines of goodness:
class Object
def metaclass; class << self; self; end; end
end
module ActionController
class Base
class_inheritable_accessor :controller_helper_module
class_inheritable_accessor :controller_helper_object
self.controller_helper_module = Module.new
self.controller_helper_object = Object.new
class << self
def add_template_helper_with_controller_helper(helper_module)
self.controller_helpe...
2006 Nov 24
13
rSpec on Rails 1.2?
I just updated my Rails install to the most current Edge and my
controller specs fail:
1)
TypeError in ''The User Controller should be a user controller''
can''t convert nil into String
Each spec fails the same way.
<context string> <spec string>
can''t convert nil into String
Any ideas what''s up with this?
Thanks,
s.ross
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