search for: public_instance_methods

Displaying 7 results from an estimated 7 matches for "public_instance_methods".

2006 May 05
11
Listing Actions
OK, call me crazy, but am I the first one to want to list out the actions that are available @ runtime? Anyone else come across this yet? Am I crazy? Well, yes, but... -- Posted via http://www.ruby-forum.com/.
2012 Sep 22
4
Class, Module, Object
>> reload! Reloading... => true >> puts Class < Module true => nil >> puts Module < Class false => nil >> puts Module < Object true => nil >> puts Object < Module false => nil >> Object.parent => Object The above indicates that the Class object instance inherits from the Module object instance and the Module object instance
2007 Mar 06
15
mocking missing methods
Hi folks. So I''m using mocha on a ruby project, and I really like it. One thing I''ve noticed is that it can be a bit "surprising" when I''m mocking methods that don''t exist on an object, and I think there''s an easyish fix. At the moment, you use sheep = mock() to create a mock sheep. What I''d like to do is something like sheep =
2006 May 07
0
NoMethodError trying to get ApplicationHelper method from a functional test
...ndor/rails/*. However, when I try to access my "current_project" public method, it fails with a NoMethodError. What is even stranger is that I can use reflection to find that the method is indeed there. For instance, this code: def test_should_login_and_redirect ApplicationHelper.public_instance_methods.each do |method| if method == "current_project" puts "calling " + method puts ApplicationHelper.send(method) end end ... Will find the method but then when it is called, it will still complain yeilding: Loaded suite test/functional/account_contr...
2005 Mar 02
4
Action ''display'' doesn''t work in 0.10.0
...the reason is that ActionController::Base inherits from Object, and because there is Object#display it will no longer be called as an action. See ActionController::Base#hidden_actions. This implies that there are a _lot_ of reserved words, you cannot use as action names: ActionController::Base.public_instance_methods. These reserved words. moreover, are not guaranteed to be stable: every time some module gets included in the inheritance chain, od some module gets extended, the list changes. I don''t think this behaviour is correct: in an OO environment I want to be able to override methods that are...
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 Apr 27
7
Role Based Authorization recipe implementation?
i got the rails recipes book, i have now an auth system for users without problems, now i want to made a role based acces for my app, im following the "Role Based Authorization" recipe of the book but i cant make it to work even when the tables created and correctly added data manually definig the roles and rights. als i dont know how to define a right for use all the actions in a