Displaying 8 results from an estimated 8 matches for "method_added".
2005 Mar 02
3
uprgrade to 0.10: uninitialized constant Class::Object
.../book/15 .
Now, when accessing the action index of the controller rss_feed, I get
this error in the terminal when I started the server:
#<NameError: uninitialized constant Class::Object>
["/usr/lib/ruby/gems/1.8/gems/actionpack-1.5.0/lib/action_view/vendor/builder/blankslate.rb:49:in
`method_added''",
"/usr/lib/ruby/gems/1.8/gems/rails-0.10.0/lib/webrick_server.rb:80:in
`define_method''",
"/usr/lib/ruby/gems/1.8/gems/rails-0.10.0/lib/webrick_server.rb:80:in
`send''", "/usr/lib/ruby/gems/1.8/gems/rails-0.10.0/lib/webrick_server.rb:80:in
`h...
2007 Nov 26
0
rSpec (rev 2996), Rails (rev 8214): TextMate bundle problems
...examples in
selected files/directories" command in TextMate, I get the following
dump:
-----------------------------------
RubyMate r8136 running Ruby r1.8.5 (/usr/local/bin/ruby)
>>> tiger_spec.rb
/usr/local/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/blankslate.rb:84:in
`blank_slate_method_added'': stack level too deep (SystemStackError)
from
/usr/local/lib/ruby/gems/1.8/gems/builder-2.1.2/lib/blankslate.rb:84:in
`blank_slate_method_added''
from
/Applications/TextMate.app/Contents/SharedSupport/Support/lib/builder.rb:86:in
`method_added''
from
/Applications...
2006 Apr 25
2
Bug in Rails 1.1 implementation of before_filters
I just spent a few hours tracking down a bug in Rails 1.1, so I thought
I''d post the issue and a workaround just in case anyone else hits it.
I designed a security enhancement so that controller methods can be
protected by preceding them with a role. The standard Ruby
method_added() callback is used to detect when controller methods are
added, and then I manipulate the controller''s before_filter chain
appropriately. My code worked fine in Rails 1.0, and then stopped
working in Rails 1.1.
I eventually tracked down the bug to the new implementation of
ActionContr...
2007 Oct 10
9
Rspec Textmate bundle errors
Hello all,
Having a problem with the Rspec textmate bundle and having quizzed
the guys in #textmate to no success about the errors, I''ve been
suggested to try you guys!
When I run the "Run Behaviour Description" command, I get the
following errors:
/Users/alastair/Library/Application Support/TextMate/Bundles/
RSpec.tmbundle/Support/lib/spec/../spec/mate/runner.rb:34:in
2007 May 30
0
DRYing up controller tests and mailer tests using superclasses
...Known issues:
* Since we don''t explicitly setup the @request and @response objects
anymore, we should probably show how to use them in the dummy test_foo
method. Could be something like:
def test_foo
@request.host = "foo.bar.com"
assert true
...
end
* The creation of the method_added-method in ControllerTest and
MailerTest should probably be DRYed up and put into RailsTest.
In any case, feedback on this is appreciated.
Thanks!
Ciao!
Florian
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "R...
2008 Feb 02
0
Adding methods to Object in Rails -- WARNING
...d of the specialized wrap that I had defined in my
class.
My solution to this was to do this:
module ActiveRecord
module Associations
class AssociationProxy
undef_method :wrap
undef_method :unwrap
end
end
end
I *think* Rails could solve this problem by hooking into
Object.method_added. And when methods are added, the hook could undef
them for the proxy class(es). The other choice would be to subclass
AssociationProxy from BlankSlate rather than Object -- it appears that
that is what BlankSlate is intended to do.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~--...
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
2006 Aug 10
28
On the total nondisclosure of the 8/9/06 security vulnerability
Dear Rails team,
The handling of the recent vulnerability in Rails has proven somewhat
problematic for us. We have recently adopted Rails as our web platform
of choice; previously, we used J2EE. We love Rails. We hate J2EE. We
don''t want to go back. It took a lot of effort and convincing to get the
management teams of our various projects to sign off on the use of
Rails. The