The ajax refresh of the dropdowns does not work after validation
failed....

Even the request made after one dropdown change its different.

Before validation:

Processing MoradasController#new_for_imovel (for 127.0.0.1 at
2010-12-09 23:04:27) [GET]
  Parameters: {"page_path"=>"moradas/[tag-page]",
"authenticity_token"=>"4f508977a10f59e31ead82aca42beed854d6be0c",
"render"=>{"0"=>{"id"=>"distrito-menu",
"part_context"=>"BAhbCToSZGlzdHJpdG9fbWVudSISdGhpczpkaXN0cml0b1sAWwciC21vcmFk
\nYSINZGlzdHJpdG8=--a088ca6d57998a4ad3572b6af81521dc6cab7773\n"}},
"morada"=>{"pais_id"=>"1"}, "imovel_id"=>"1-ev-lus"}

After validation:

Processing ImoveisController#1-ev-lus (for 127.0.0.1 at 2010-12-09
23:03:20) [GET]
  Parameters: {"page_path"=>"moradas/[tag-page]",
"authenticity_token"=>"4f508977a10f59e31ead82aca42beed854d6be0c",
"render"=>{"0"=>{"id"=>"distrito-menu",
"part_context"=>"BAhbCToSZGlzdHJpdG9fbWVudSISdGhpczpkaXN0cml0b1sAWwciC21vcmFk
\nYSINZGlzdHJpdG8=--a088ca6d57998a4ad3572b6af81521dc6cab7773\n"}},
"id"=>"moradas", "morada"=>{"pais_id"=>"1"}}

it seems has lost the context :(

Maybe its time to upgrade to 1.0 :D

Thank you both.

On Dec 9, 12:28 am, Matt Jones <[email protected]> wrote:
> On Dec 8, 2010, at 7:08 PM, Daniel M wrote:
>
> > Once again, thank tou for your attention!
>
> > Here it is the model the controller and the log error 
> > :https://gist.github.com/734141
>
> > I have no ideia why the after validation fails the drop downs stop to
> > work...
>
> > Any ideia?
>
> I think you're fighting the framework a little too hard here. The reason 
> you're getting the 'For: (Not Available)' situation is that when you create 
> an address object manually with Address.new(params[:address]), it doesn't 
> pick up the association foreign key. You might want to try:
>
> def create_for_imovel
>   hobo_create_for :imovel do |format|
>     format.html { # set flash, etc; only reached if there's a successful save 
> }
>     format.js
>   end
> end
>
> BTW, I *highly* recommend upgrading to at least the 1.0 release, as there's 
> not too many incompatibilities with 0.8.5 but there are A LOT of fixed bugs.
>
> --Matt Jones

-- 
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.

Reply via email to