I recently uncovered a couple bugs in my app when error messages only turned up after I added the validates_date_and_time plugin. I started getting FAILSAFE errors when opening various index or view pages that vanished when I deleted the plugin. That didn't make sense, since I wasn't validating anything on index pages. After digging deep into rails source with debugger, I discovered that my model failed to specify a many-to-many association correctly (I had project belongs_to custodian through project_custodians, and project_custodian belongs_to project, but omitted project has_many project_custodians).
These things are frustrating. I'd suggest editing the source to insert calls to logger.info or debugger at an appropriate method in the stack dump so you can understand better what is the context in which the error occurs. Alternatively, define the method changed? in your class and have it call debugger... On Jun 8, 9:24 am, Spiralis <[email protected]> wrote: > Yes. As soon as I get some time to do so. I am running between > projects firefighting at the moment :(. > > I believe it may have something to do with premissions, as I have > changed some parts to allow for lifecycles and easy checks for access. > As well as locking down the site making it private. > > On Jun 5, 9:18 am, sam-o <[email protected]> wrote: > > > Sorry, i have not encountered that error. Can you send me some code to > > try it out? > > > On May 31, 6:25 pm, Spiralis <[email protected]> wrote: > > > > I have the same problems as Gabriele. I am using Rails 2.2, but have > > > patched in Sam's i18n support - which btw in my opinion is of real > > > good value! I am not sure what the status is in regards to Sam's > > > locale patch and hobo 0.8.7 though... > > > > Only changes in my app from a typical Hobo 0.8.5 is: > > > * a mod to make the site private (http://cookbook.hobocentral.net/ > > > recipes/10-make-a-private-hobo-app) > > > * a mod to add an admin subsite (http://cookbook.hobocentral.net/ > > > recipes/3-create-an-admin-subsite) > > > * Sam's locale patches (http://github.com/soey/hobo-i18n/tree/master) > > > > Then of course I have my own models and stuff, but those are the only > > > things that deviate from default Hobo. > > > > My stuff worked nicely until I patched in Sams stuff, now I have > > > problems with the edit view of the User controller/model. I somehow > > > tend to think that this isn't related to Sam's changes though... > > > > ~Ronny > > > > On May 29, 2:36 pm, Bryan Larsen <[email protected]> wrote: > > > > > What version of Rails are you using? `changed?` is a method introduced > > > > in Rails 2.1 with additions added in 2.2. Could you try it against > > > > Rails 2.2 and/or 2.3? > > > > > Could you also try against Hobo 0.8.7? > > > > > If it still fails, is there any way you can send me the code to try it > > > > out? > > > > > thanks, > > > > Bryan > > > > > Gabriele Tassoni wrote: > > > > > Cannot find an evidence of a similar problem in the groups... and I > > > > > can't track down what's causing it... > > > > > > As per subject, this is the error thrown: > > > > > > method `changed?' not defined in Invoice > > > > > > The last lines of the log are: > > > > > > /Library/Ruby/Gems/1.8/gems/hobo-0.8.5/lib/hobo/permissions.rb:383:in > > > > > `remove_method' > > > > > /Library/Ruby/Gems/1.8/gems/hobo-0.8.5/lib/hobo/permissions.rb:383:in > > > > > `send' > > > > > /Library/Ruby/Gems/1.8/gems/hobo-0.8.5/lib/hobo/permissions.rb:383:in > > > > > `deunknownify_attribute' > > > > > /Library/Ruby/Gems/1.8/gems/hobo-0.8.5/lib/hobo/permissions.rb:382:in > > > > > `each' > > > > > /Library/Ruby/Gems/1.8/gems/hobo-0.8.5/lib/hobo/permissions.rb:382:in > > > > > `deunknownify_attribute' > > > > > /Library/Ruby/Gems/1.8/gems/hobo-0.8.5/lib/hobo/permissions.rb:337:in > > > > > `edit_permitted?' > > > > > /Library/Ruby/Gems/1.8/gems/hobo-0.8.5/lib/hobo/permissions.rb:296:in > > > > > `with_attribute_or_belongs_to_keys' > > > > > /Library/Ruby/Gems/1.8/gems/hobo-0.8.5/lib/hobo/permissions.rb:335:in > > > > > `edit_permitted?' > > > > > /Library/Ruby/Gems/1.8/gems/hobo-0.8.5/lib/hobo/permissions.rb:207:in > > > > > `editable_by?' > > > > > /Library/Ruby/Gems/1.8/gems/hobo-0.8.5/lib/hobo/permissions.rb:121:in > > > > > `with_acting_user' > > > > > /Library/Ruby/Gems/1.8/gems/hobo-0.8.5/lib/hobo/permissions.rb:207:in > > > > > `editable_by?' > > > > > /Library/Ruby/Gems/1.8/gems/hobo-0.8.5/lib/hobo/hobo_helper.rb:253:in > > > > > `can_edit?' > > > > > /Library/Ruby/Gems/1.8/gems/hobo-0.8.5/taglibs/rapid_core.dryml:28:in > > > > > `field_list' > > > > > /Library/Ruby/Gems/1.8/gems/hobo-0.8.5/lib/hobo/dryml/ > > > > > template_environment.rb:259:in `new_context' > > > > > > Well.. I'm a bit stuck! °_° > > > > > > Thank you for the help.. > > > > > > G. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Hobo Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/hobousers?hl=en -~----------~----~----~----~------~----~------~--~---
