fixing disappearing options#91
Conversation
…emoves data out of the config stored in an instance variable
|
Hi @suung, I'm trying to determine under exactly what conditions the problem you mention is occurring. You mention an 'instance variable with config' - what variable are you referring to here? Also, you mention 'several render calls' - I guess you mean that you're calling render_navigation multiple times in different places in a template. I would like to get this fixed up so it doesn't cause the problems you're encountering, but without tests or further explanation I'm nervous that doing what is possibly half the job might be worse! If you could get back to me with a few more details, that'd be much appreciated. Cheers, Mark. |
|
hey mark, sorry for the delay. yeah, i am not sure how to test this, but will work somehow. i currently ran in the same problem, where someone forgot to use our patch. where what this means is: normally you would render one navigation once. and another somewhere else. if i can breath again and my code gets stable, then i will certainly come back to you with a test |
|
Hi @suung, Any sign of that test yet? :-) Cheers, Mark. |
…les containing the navgiation
|
hey, i just pushed it on our repo. heading to amsterdam now. cheers On Thu, 2012-05-31 at 01:48 -0700, Mark J. Titorenko wrote:
|
|
I think I don't understand the problem here. Can you briefly wrap up your setup again and explain exactly what the problem is? Thanks |
|
hey andi, good you are back. basically in the first render call, stuff gets .delete(:bla) out of the options hash. if, for some reason, you might render the same (dynamic) navigation twice, you loose it. makes sense, if you think about it. cheers |
|
If I understand the problem. Calling If that's precisely the issue here, it's working correctly with the current implementation. |
|
most likely it has been fixed. I don't know, there was a options.delete(...) scenario in a nesting above 1 level. it is very obvious in the code. if it is fixed, it is not in the code anymore, maybe someone can take care for this. anyway here is my work including tests. https://github.com/devolute/simple-navigation/commits/master |

hey andi,
problem was:
this seems to fix it.