Displaying 20 results from an estimated 1000 matches similar to: "Question about file_column plugin"
2006 Mar 04
13
file_column
Restricting size of an uploaded file, is how is that possible? If I
do not want a user to upload a file larger than X bytes, can it
easily be done?
If I also would like restrict the types of files that can be
uploaded, how may I do so?
Thank you,
Sharkie
2006 May 25
4
How to add a migration with a plugin?
I''m working on a plugin that requires some database support to do its
job (adding a model or two). I''d like the plugin to automatically add a
migration once it is installed. Is there already a mechanism for this?
If so, how do you do it?
--
*Berin Loritsch*
Owner
*Work:* 571-215-7708
*Email:* bloritsch@d-haven.com <mailto:bloritsch@d-haven.com>
*IM:*
2006 Dec 17
1
file_column error: StringIO Instead of Temp_File
Hi all,
i am using file_column to upload 3 images from the same form, they are
all different names and DOM IDs so there isn''t a problem with the
multiple upload.
The problem is when i try to upload a file (or 2, or 3) sometimes it
works, but sometimes i get this in the log file:
"bar_image"=>{"file_temp"=>"",
2006 Mar 08
3
ActiveRecord and Images
Not really a Rails question, but a "best practices" one.
If I want to associate an image to every account in my application,
is it better to insert the image file directly inside the db or to
upload the image in public/images/ ?
Also, if I want to associate a cover to a movie, what''s the best
approach ?
TIA,
ngw
--
Nicholas Wieland
nicholas_wieland@yahoo.it
2006 Mar 07
6
how to add onchange javascript event to select field
I would like to add javascript ''onChange'' event handling for a select
field, such as
<%= collection_select("job", "client_id" , @clients, "id", "name") %>
with onChange="xxx"
Anyone know how to make this work?
Thank you,
Scott
--
Posted via http://www.ruby-forum.com/.
2006 Jul 27
2
ActiveRecord retrieval style? Lazy initialtization?
I''m using ActiveRecord for an Extract and Transform operation, so it is
outside of its native environment of Rails. I am running into a problem
with memory consumption when I retrieve large amounts of data. By large
amounts I am talking about roughly 12,700 records that each have a one
to many relationship with about 15 additional types of information. One
of those types happens
2006 Mar 03
7
Workflow + Rails
Is there any project or solution for an easy integration of a WFE / WfMS
into rails? I''m quite new to this topic, but I probably need a small
subset of workflow patterns (or whatever the correct term is) only. Any
pointers are welcome.
--
Posted via http://www.ruby-forum.com/.
2006 Mar 07
6
Flickr - Tutorial
So I''ve pretty much followed the steps in the video tutorial on RoR.com
for creating a small app, to search for photos on flickr.com - all is
good, and works as intended to..
How would I go about adding validation, so if no tags are specified it
will fail. I know I have to use validates_presence_of :tags - but not
in the controller.. so I tried to generate a model called
2006 Mar 05
4
Resizing images and creating thumbnails
Hi,
1. How to resize an image uploaded by a web form before saving it to the
disk? (i need all uploaded images to have similar size)
2. How to create thumbnails? Is it enough if i specify small size of the
image in html or would the image look horrible? Can i do it somehow in
''realtime'' using javascript? Or is it best to create thumbnail as a
separate file?
3. How to get
2006 Mar 02
4
Getting Acts_as_Paranoid to work with validates_uniqueness_of
Hello
I''ve been using Acts_as_Parnoid for a while and it has been working well
but I am now having a slight issue with it. I have a company table were
I would like to use validates_uniqueness_of :company_name. This
validation works if a company exists in the database and has not been
deleted. However, I also would like the validates_uniqueness_of to
work if a company has
2006 Mar 07
6
Anybody use Red|Blue Cloth?
Does anybody use and prefer Redcloth (or bluecloth, which appears to be
alpha)? Does it affect performance much? Is there a way to get it to
automatically process templates without having to call textilize?
Thanks,
Joe
--
Posted via http://www.ruby-forum.com/.
2006 Mar 07
2
Using form_tag_with_upload_progress
All,
I''m attempting to use "form_tag_with_upload_progress"
http://railsmanual.org/module/ActionView::Helpers::UploadProgressHelper/form_tag_with_upload_progress
However, I''m having a hard time understanding what I''m supposed to
provide and where in order to take advantage of it. There''s a lot of
information and I''m sure I can figure it
2009 Apr 24
1
RoR - getting started with database relations
Hey everyone... I''m just getting my feet wet with relational databases
using RoR models. The software I''m putting together relies on car
parts. Originally I had the database set up as follows
create_table :parts do |t|
t.column :year, :string
t.column :make, :string
t.column :model, :string
.
.
.
end
However, I now realize it''s much better to do it using
2008 Jul 22
2
ActiveRecord Associations issue
Hello all and thank you for reading this message.
I am new to RoR, and ruby too, but i am quite excited about it.
I am developing a RoR project and with active record associations in
the following
manner
# Tables (all tables have only one record)
CREATE TABLE `webcars_development`.`cars` (
`id` int(11) NOT NULL auto_increment,
`model_id` int(11) NOT NULL default ''0'',
2005 Dec 14
3
image upload (apache2.0+ lighttpd)
Hello all,
I use lighttpd 1.4.8 and I have a problem with image uploads.
I tried file_upload plugin, but it is strangely working sometimes and
refuse to work sometimes.
Function in the controller is (@user is loaded in before_filter)
def update_watermark
@user.watermark = params[:user][:watermark]
@user.save
redirect_to :action => "index"
end
Model is
2007 Sep 19
3
Create method calling wrong column name in a table
I have a multitable database with an observer logging changes into a
datachange table.
The create method inserts the data into the data change table, updates
my model, and then trys to load from the datachange table. When it
does this it WHERE clause that is generated for me is looking for a
column model_id which I dont have. I don''t want to even have a field
because this table will be
2006 Mar 22
3
Parent-Child Tables Help
can someone help me with this
i have a table
cars
(
id int
model_id int
make_id int
color_id int
description text
constraint fk_cars_carmake foreign key(make_id) references
carmakes(id),
constraint fk_cars_carmodel foreign key(model_id) references
carmodels(id),
constraint fk_cars_color foreign key(color_id) references colors(id)
)
carmakes
(
id int
carmake varchar
)
carmodels
(
id
2006 Apr 25
3
limiting options in file_upload
Does anyone know if it''s possible to set constraints to the size & type of file that file_column will accept?
I''d like to limit to image files of less than 2MB.
If this isn''t possible with file_column, is there a graceful way of getting the controller to handle it?
thanks
dorian
--
--
I do things for love or money
2006 Mar 07
6
form_tag - directing to new target window
How do I use...
<%= link_to "All Facilities", :action => ''fac_log_all'' %>
if I add :target => "_new" that is just a parameter and not a
directive.
I just want reports to print into a separate window. How do I do that?
It''s not clear at all to me
Craig
2006 Nov 29
5
Collection_select with two columns and a prompt
Hello,
I am quite a newbie to RoR, I hope you maybe able to help.
I have a collection_select in a _form.rhtml:
"collection_select(:assets, :model_id, @models, :id,
:model_ref,options={:prompt => ''- Select a model -''})"
As you see my drop down menu will show the model_ref column.
1) Is it possible to have more than one column. For example I would
like to