Displaying 3 results from an estimated 3 matches for "importcontroller".
2008 May 01
1
Strategy for importing temporary .csv file?
...ile_field_tag "file", :size => 75, :class => "csv-input" -%></
p>
<p><strong><label for="file">File to Upload</label></strong></p>
<p><%= submit_tag -%></p>
Here''s my controller code:
class ImportController < ApplicationController
def aaccount_import
@owner = Owner.find(2)
n = 0
unless params[:file].nil?
fullpath = File.expand_path(params[:file]) # this doesn''t blow
up but some books say that a file object is passed and thus File
methods should apply?
FasterCSV.foreach(&quo...
2006 Jul 14
3
compare two tables and find the difference?
...;,
charge.charge_name, :size => 50 %></td>
<td><%= collection_select ''charge'', ''charge_type_id'', @charge_types,
''id'', ''full_name'' %></td>
</tr>
the relevant part of the controller:
class ImportController < ApplicationController
...
def update_charges
@new_charges = Source.absent_charges
@charge_types = ChargeType.find(:all)
if request.get?
redirect_to :action => ''update_tables'' if @new_charges.empty?
else
begin
params[:charge].each do...
2008 Feb 16
2
NoMethodError... but its not a method!
Hi everyone,
I am putting together an application in which each part of it was
tested individually. Now that it is put together, I''m having problems...
The one giving me problems is my "ImportController" which parses a CSV
during post and puts it into my database. I have two separate CSV upload
actions (one is for a bill called "bes" and the other from the provider
"prov"). The one for BES works fine. Prov worked perfectly fine before,
but now it gives me this error:
unde...