Skip to content

Commit

Permalink
fix form
Browse files Browse the repository at this point in the history
  • Loading branch information
ap13 committed Mar 2, 2011
1 parent 931d22f commit ad4896c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions app/controllers/plates_controller.rb
@@ -1,5 +1,6 @@
class PlatesController < ApplicationController
def search
render :text => ""
#render :text => Plate.sanger_barcodes(params[:source_plates]).join('<br />')
end

Expand Down
8 changes: 7 additions & 1 deletion app/controllers/process_plates_controller.rb
Expand Up @@ -8,7 +8,13 @@ def new
end

def create
process_plate = ProcessPlate.new(params[:process_plate])

process_plate = ProcessPlate.new({
:user_barcode => params[:user_barcode],
:instrument_barcode => params[:instrument_barcode],
:source_plates => params[:source_plates],
:instrument_process_id => params[:instrument_process]
})
respond_to do |format|
if process_plate.save
process_plate.create_audits(api)
Expand Down
1 change: 1 addition & 0 deletions app/controllers/users_controller.rb
@@ -1,5 +1,6 @@
class UsersController < ApplicationController
def search

render :text => UserBarcode::UserBarcode.find_username_from_barcode(params[:user_barcode])
end

Expand Down
6 changes: 3 additions & 3 deletions app/views/process_plates/new.html.erb
@@ -1,5 +1,5 @@
<h2>Add Process</h2>
<%= form_for :process_plate, :url => new_process_plate_path do %>
<%= form_for :process_plate, :url => process_plates_path do %>

<table>
<tr>
Expand All @@ -18,8 +18,8 @@
<td><div id="source_plates_results"></td>
</tr>
<tr>
<td><label for="instrument_barcode">Instrument process</label></td>
<td><%= select_tag :instrument_barcode, options_for_select(InstrumentProcess.sorted_by_name.map { |x| [x.name, x.id]}) %></td>
<td><label for="instrument_process">Instrument process</label></td>
<td><%= select_tag :instrument_process, options_for_select(InstrumentProcess.sorted_by_name.map { |x| [x.name, x.id]}) %></td>
<td></td>
</tr>
<tr>
Expand Down

0 comments on commit ad4896c

Please sign in to comment.