You are welcome Stefan, I'm glad the workaround works :). I'll try to find a more definitive solution.
Interesting use of permissions to simulate a "has_one", I like it! You could also use some other Rails syntax sugar like: def create_permitted? acting_user.billing_addresses.empty? end Regards, Ignacio El 16/01/14 11:35, Stefan Haslinger escribió: > Hi Ignacio, > > Thanks a lot! Your workaround works, even with authorization back in > place. Awesome! > So you are also right about the error message's content... > Also the helpers around pick up the new routes correctly > (<transition-button>). > > Btw, my billing addresses are a has_one scenario in real life. > I read a lot around Hobo not supporting that, tried several hacks and > finally found it quite nice way getting that feature back introducing > > > def create_permitted? > > acting_user.billing_addresses.count == 0 > end > > > I would't call it a bad hack, because reading it tells the truth. And > other restrictions like <=5 or > whatever are easily manageable without validations. > Slowly I learn to love the power of Hobo authentications, here it's the > just in time execution of permissions. > > Warm regards, > Stefan > > -- > You received this message because you are subscribed to the Google > Groups "Hobo Users" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/hobousers. > For more options, visit https://groups.google.com/groups/opt_out. -- Ignacio Huerta Arteche http://www.ihuerta.net Teléfono: 0034 645 70 77 35 Email realizado con software libre -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/hobousers. For more options, visit https://groups.google.com/groups/opt_out.
