Displaying 20 results from an estimated 10000 matches similar to: "newbie questions: two tables - one form"
2006 Apr 27
3
LoginEngine File_column interop
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
Hello all,
I hope someone can help me with this issue, I have the SVN
file_column and using LoginEngine/UserEngine with Rails 1.1.2. My
issue is that I''m overloading the view for LoginEngine to support a
file image upload as part of the user record and having a heck of a
time doing so.
Near the bottom of my new _edit.rhtml
2006 Jul 24
2
Newbie error message!
hello you all,
I''m new with Ruby on Rails. I''m developing an application. I got the
follwoign erro, can anybody give a hand?
ArgumentError in AdminController#import_strings
wrong number of arguments (0 for 1)
RAILS_ROOT: ./script/../config/..
Request
Parameters: {"commit"=>"Import",
2006 Apr 03
4
Multiple file uploads - only one file object gets posted
All,
Trying to upload multiple files.
Form:
<% index = 0
for @image in images do %>
<TR>
<TD>
<%= @image.path.split(''/'').last[0..39] %>:
<% if ((! @image.path.nil?) && (@image.path.length > 40)) %>
<%= h("...") %>
<% end %>
</TD>
<TD>
<%=
2007 Aug 22
8
How to spec an attachment_fu model
First off, I''m not trying to spec attachment_fu, I know it''s been tested.
But, I added some code to that model that I do need to test. Basically,
I need to somehow fulfill the "uploaded_data" property so I can actually
run my tests(otherwise they fail because of validations). The
"uploaded_data" field is what would grab the multipart data from form.
Here
2006 Jul 21
1
Newbie Question about Ruby on rails---cant upload data
Hi everybody,
Ruby on Rails is my first programming lenguage...it looks to me like i''m
missing the big picture. I''m trying to upload a file into a database.
In my app. my user needs to select a file and upload it...however I only
want him to upload certain information from that file. I have written
code to parse only string tables from that file. For example, the table
2006 Aug 15
8
AGAIN: file object treated as string
I am trying to implement the uploading of a file to a remote server
I get error while trying to write the file on the server. The error I
get is the following:
undefined method `rewind'' for #<String:0x2aaaad062eb8>
It seems to be treating my file as a string instead of a File object.
--------- Code is below ------------------
VIEW:
<%=
2006 Mar 05
2
How to clean up this code?
Hi!
I''ve got 2 tables: products and images. Product has_many images, image
belongs_to product. In images table i store product_id and name of the
image (not the image itself).
I''ve created a single form, where user can add any number of images for
a
product he/she is creating (new fields are created using javascript).
The images that are uploaded are saved to public/images
2006 Jul 31
10
nothing uploads.....why? (newbie question)
Hi everybody,
I know this is an easy question but I don''t seem to see the solution.
I''m trying to have a user select a file so that my code can parse it and
populate the database with corresponding values. So far it seems like
uploads but nothing shows in my db. Can anybody give me a hand?
thanks
view:
h1>Importing Strings<h1>
2006 Mar 08
19
Creating multiple rows with one form
Hello. I''ve been trying this out for the past two days and I can''t seem to
get it. I''m going to have a page where you can upload x amount of images at
once. Lets say 10 images need to be uploaded, all with a caption.
I''d like to have a browse button to choose the file, then the caption. Now,
if I put 10 of them in one form, fill them all out and submit, I get
2010 Nov 23
5
ActiveRecord not getting true value from checkbox
I have a checkbox tag as follows:
<%= f.check_box :receive_offers %>
When I view source in the html, I see the value of the checkbox is "1",
with the normal hidden field value of "0". However, after posting the
form and saving to the database, the Mysql column, which is a TinyInt,
is ALWAYS 0.
I''ve tried it with true/false values instead, and no luck.
Any
2006 Jun 20
1
Soliciting suggestions - Form within a Form
Greetings!
I could use some suggestions on how to proceed from where I am to where I want to go.
I''m working on an app that collects info from the visitor and saves it to a file. The file can later be read in for update. To collect the info, the app presents a form with a set of checkboxes. The state of the checkboxes at initial presentation is controlled by a summary record that is
2006 Mar 06
0
two or three tables in one form
Hi
I am new to RoR. I watched video presentation of 15 minutes to create a
blog. What I understand is RoR brings/maps the database table to web
form (using
script\generate model Post and later script\generate controller Blog).
In the case ,I have 2 and 3 tables into 1 form. Does RoR support that?
For example: I store products and providers in two tables. These two
tables link together by
2006 Apr 20
0
many many checkboxes
Hi *,
Starting to try and figure out the best way to handle the next part of
my first application.
I need to provide a form which will host approx 60 checkboxes - each
respective checkbox will need to relate to a boolean (tinyint? - I
persume a boolean would be best, (ticked / not ticked)).
I have had quite a google around on this and I have seen some tutorials
where it is suggested to use
2005 Dec 25
2
[repost] newbie questions
Hi all,
I''m following the shop example in ''Agile Web Development with Rails''.
I would like to extend the checkout screen, in such a way people can change
the number of items they have selected in there cart.
In my controller I have:
def checkout
@cart = find_cart
@items = @cart.items
if @items.empty?
2011 Jul 19
0
Problem with nested form using collection_select and date_select
Hello people
I have a table named Items. Items belongs_to inventory, and Items
belongs_to product.
so items looks like
Item
-id
-inventory_id
-product_id
-date
-comments
The main idea is that I want to create an item while I''m creating the
inventory by using nested form in the inventory form (I already test
creating item with its own methods and forms and works fine), and I
get an
2006 Jul 18
2
newbie help re: loading data and relationships in migrations
Hi folks,
I''m new to Ruby & Rails, and have been reading the Agile Web dev &
Pickaxe books with much joy!
However, I need some guidance re: using migrations to load in data for
tables that have relationships.
For example, I have one products table and one product_photos table
(defined in separate migration files). The second table has a foreign
key associated with the
2006 Mar 07
2
Sql Server 2000 booleans not working
I am migrating to sql server 2000 from postgres and I have tried char(1),
int, tinyint and bit datatypes to replace booleans, but without luck. the
1''s and 0''s are stored properly in the db, but checkboxes and dropdowns are
not being auto-populated in rails. Anyone experience this before?
thanx
--
View this message in context:
2006 Mar 21
3
Newbie - ActiveRecord relationships
So I''ve worked through Agile Web Development with Rails and I''m now
trying my first little app to get into the swing of things. Its a task
tracking app where people can create tasks and assign them to others,
and also log time against the tasks.
I''m having trouble working out the model relationships. This is what
I''ve got so far, but its not right as
2006 Apr 04
3
newbie - HABTM problems writing to Join Table in SQL
I am attempting to document a join between two tables. There seems to be
no writing to my database. Please help me out it is driving me absolutly
crazy.
Basically i''ve got a table of directors that is called when the new/edit
controller model for films is activated. It shows the user a selectable
list of directors they can apply to films. The problem is in the
update/create part. I
2010 Mar 09
9
Ajax-submit form on "check box onclick ": why this error?
Hi there,
I need to have a checkbox which ajax-submits a form.
The following code throws an error "index 112009 out of string". What''s
wrong here?
==============================================
<% form_remote_tag :url => { whatever_url } do -%>
<%= check_box_tag ''whatever'', nil, whatever, { :onclick =>