Displaying 9 results from an estimated 9 matches for "class_attributes".
Did you mean:
class_attribute
2012 Sep 28
0
Overriding class_attribute writers and order of super/extend C.M./included block eval in ActiveSupport::Concern
I have:
module MySpike
extend ActiveSupport::Concern
included do
class_attribute :foobar, instance_writer: true
end
end
But, I want to be able to override the class attribute writer and/or
instance writer method to do something when the attribute is set via
self.foobar = true before or after calling super to set the attribute.
Unfortunately, I can''t find a clean way
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?
--
You received this message because you are subscribed to the
2012 Oct 16
5
`method_missing_without_paginate': undefined method `class_attribute' for ActiveRecord::Base:Class
hi
i am using radiant 0.8.2 , rails 2.3.4, ruby 1.8.7 and rubygems 1.4.2. and
i can''t able to run my existing application.
error occurred :
run command for server "script/server -e production -p 3001"
error:
=> Booting WEBrick
=> Rails 2.3.4 application starting on http://0.0.0.0:3001
config.gem: Unpacked gem rack-rewrite-1.2.1 in vendor/gems has no
specification
2012 Feb 16
1
How to disable instrumentation in rails 3?
There is a bug in jruby that causes thread locks around things like
accesses to class attributes created with class_attribute. The
notifications system is affected by this, and it''s blowing up our app.
We need to disable all instrumentation and notifications for the time
being. Anyone know how to do that cleanly?
CHris
--
You received this message because you are subscribed to the
2010 Sep 08
1
Unintended side-effect from before_remove_const?
...A simple one-liner, it would appear, but AR::Base implements before_remove_const to do a bit of scoped method cleanup... It''s the only thing I can see that might cause the problem, which is:
When accessing an AR::Base subclass via a reflection''s klass accessor, it seems as though class_attributes which are set up via macros (attr_unsearchable in the MetaSearch case, but I also checked with attr_protected) do not have their values. Commenting that single line:
constantize(const).before_remove_const if constantize(const).respond_to?(:before_remove_const)
will cause the failures to come and...
2012 Sep 08
4
dash symbol
In the example below, what is the dash doing between the class
attribute and array:
(field_helpers -
[:label, :check_box, :radio_button, :fields_for, :hidden_field, :file_field]).each
do |selector|
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2011 Jul 14
0
subclasses with inherited_resources?
I''m trying out inherited_resources and so far so good. However, one
problem I''ve run into is that it''s very difficult to customize
inherited_resource behaviour in subclasses. Looking through the
source I see it uses things like undef_method and class_attribute.
For example, if I have the following controllers:
class ItemsController
inherit_resources
actions :new,
2012 Oct 03
1
Is there planned support for permitting params one at a time vs. all at once in strong_parameters/Rails 4?
Was going to have a variety of request params sent in and use a
class_attribute that would define types of request parameters that are
allowed. strong_parameters wouldn''t be too much trouble in such a case if
it would allow me to manually permit some attributes (dynamically
determined) in the controller but allow strong_parameters to enforce
security of others.
Is this something
2010 Aug 06
5
[PATCH] GSoC 2010 - Memory hotplug support for Xen guests - second fully working version - once again
Hi,
I am sending this e-mail once again because it probably
has been lost in abyss of Xen-devel/LKLM list.
Here is the second version of memory hotplug support
for Xen guests patch. This one cleanly applies to
git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git
repository, xen/memory-hotplug head.
Changes:
- /sys/devices/system/memory/probe interface has been removed;