Created
May 17, 2011 19:35
-
-
Save andrellima/977209 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def edit | |
@fluxo = Fluxo.all | |
@passo_fluxos = PassoFluxo.find_all_by_fluxo_id(params[:fluxo_id]) | |
@passo_fluxos = @passo_fluxos.collect { |p| [p.descricao, p.fluxo_id] } | |
@proximo_passo_fluxo = ProximoPassoFluxo.new | |
fluxos = Fluxo.find(:all, :order => "descricao ASC").map{|fluxo| [fluxo.descricao, fluxo.id]} | |
@fluxo_origem = fluxos | |
@fluxo_destino = fluxos | |
end | |
<div class="field"> | |
Fluxo de Origem<br /><br /> | |
<%= select "fluxo_origem", "id", @fluxo_origem %> | |
</div> | |
<div id="passo_fluxo_origem" > | |
<%= select("proximo_passo_fluxo", "passo_fluxo_origem_id", @passo_fluxos) %> | |
</div> | |
<div class="field"> | |
Fluxo de Destino<br /><br /> | |
<% if @passo_fluxos %> | |
<%= select "fluxo_destino", "id", @fluxo_destino %><br /><br /> | |
<% end %> | |
</div> | |
<div id="passo_fluxo_destino" > | |
<% if @passo_fluxos %> | |
<%= select("proximo_passo_fluxo", "passo_fluxo_destino_id", @passo_fluxos) %> | |
<% end %> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment