but i will need the AS form to do the same visual as AS maybe if i call the 'new' action from AS with @record with the updates
2009/1/18 Mike Gaffney <[email protected]>: > > Okay, that's a controller action that is not a normal restful action. > @record won't be created for it by AS, code it up as you would any other > action without active scaffold. > > Vinicius wrote: >> ok i try that but i dont works for me >> i have that: >> >> in controller : >> def buscar_por_cep >> @resultado = BuscaEndereco.por_cep(params[:cep]) >> @record ||= Endereco.new >> @record.atualiza(@resultado) >> respond_to do |f| >> f.js >> end >> end >> >> in rjs >> @resultado #array com o valor dos campos abaixo >> @insert_row = @resultado >> #campos=%w"logradouro rua bairro estado cidade cep" >> page.insert_html :top, 'here', :partial => 'create_form' >> >> and the overrided form( no especial reason to override ) >> <div id='here'> >> >> </div> >> <%= render :super %> >> >> but with this i get a horrible create form with a lots of \\n and >> javascript >> well dont works... >> >> what im doing wrong? >> >> On 14 jan, 13:21, "mr.gaffo" <[email protected]> wrote: >> >>> @record and @records >>> >>> On Jan 13, 6:36 am, Vinicius <[email protected]> wrote: >>> >>> >>>> hi >>>> i im working on a project and im needing a way to update a record with >>>> some atributtes for active scaffold, but i dont find anything about >>>> that on docs for AS >>>> >>>> what i need is know the variable names where AS have the objects, with >>>> this i can pass this variables with params[] and update ... i think ^^ >>>> >> > >> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en -~----------~----~----~----~------~----~------~--~---
