Displaying 20 results from an estimated 30000 matches similar to: "Test for file_column"
2006 Jul 23
8
destroy vs delete
what is the difference between destroy and delete in AR
I am not sure what they mean by
"Destroys the record with the given id by instantiating the object and
calling destroy<http://api.rubyonrails.com/classes/ActiveRecord/Base.html#M000866>(all
the callbacks are the triggered). If an array of ids is provided, all
of them are destroyed."
in
2006 Aug 17
3
file_column do download from URL
Is there a simple way of forcing file_column to download file from given
(ex. in form) url instead of uploading it manualy?
I know:
http://blog.caboo.se/articles/2006/01/09/file_column-magick-and-versions
require ''open-uri''
Attachment.find_first.filename = open(url)
if not working as expected... what is interesting is that:
>> @a =
2006 May 07
1
file_column problem - uninitialized constant Magick
Hi,
I''m on Windows and getting the following error while trying to use
file_column with RMagick,
uninitialized constant Magick
C:/INSTAN~1.0/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in
`const_missing''
#{RAILS_ROOT}/vendor/plugins/file_column/branches/kyle/lib/file_column.rb:621:in
`file_column''
I installed file_column by
2006 Jul 24
1
upload progress
what is the best method for adding upload progress functionality
there are the fcgi and mongrel plugins...
but is there an HTTP Server agnostic way of doing upload progress stats
cheers
dion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060724/7c477b9c/attachment-0001.html
2006 Jul 19
2
best practice deployment
what is the best method to deploy from a development machine to production
when you need slightly different files for each mode
do you use TWO files such as db.yml.dev and db.yml.prod
and use capistrano to deploy one or the other to database.yml
or is it better to have one file
and use conditions in your file such as
<% if ENV[''RAILS_ENV''] = "production" %>
2006 Aug 16
1
absolute default route in routes.rb
how do you set a default route in routes.rb
so that anything not recognised will default to :controller => ''home''
map.connect ''*'', :controller => "home"
does not work so well
cheers
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Jan 05
1
File_column image validation
Hello,
Is it possible to enforce minimum image size and other validations using
file_column? if so does anybody have some examples. I have looked at Kyle''s
file_column extension and I saw that it enforces format''s (jpg,pdf etc) but
nothing for size.
Thanks!
Sunder
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Jan 13
1
file_column - how to test for empty column?
I am using the excellent file_column, but have run into an issue.
I am wanting the user to be able to *not* upload an image if they so
choose. Then I am trying to determine if that column is empty or not,
and display a generic image if that column is empty.
I have tried both of the following code blocks:
<% if @newsentry.image -%>
<%= link_to(image_tag((url_for_image_column
2006 Apr 25
7
[TIPS] File_column plugin and multiple file uploads
No..i am not a full time rails developer...i code in pl/sql for paying my
bills...and i am just working on a pet project...so i had some trouble in
doing..what i specify in the subject.....now somehow i solved this
problem...so those interested can look at the code at:
http://hemant.wordpress.com/2006/04/25/file_column-and-how-the-fuck-it-handles-multiple-files/
I write this mail and
2006 Mar 26
2
File_Column plugin causes strange errors on windows
I installed the File_Column plugin and setup my relationships.
create_table "screenshots", :force => true do |t|
t.column "image", :string, :limit => 255, :null => false
t.column "description", :text
t.column "created_on", :datetime, :null => false
t.column "item_id", :integer, :null => false
t.column
2006 Aug 09
0
Re: association does not get foreign key
On 8/10/06, Dion Hewson <dionhewson@gmail.com> wrote:
>
> I have a 1 to 1 relationship using a similar example as below (has_one, belongs_to)
>
> but when I do the save, the foreign key of the child object is not set to the id of the parent object in the relation ship
>
>
> any ideas?
>
> cheers
>
> dion
>
> ---------------------------------
>
>
2006 Jun 22
3
Importing images with file_column over http?
I haven''t cracked the source of file_column just yet - but has anyone worked
out a way to snag images via URL instead of a file upload?
Optimally I''d like to have my clients be able to upload a file, or enter in
a URL to store as file on the system.
Any/all help would be cool.
--
seth at subimage interactive
http://www.subimage.com/sublog/
-------------- next part
2006 May 08
1
file_column - url_for_file_column issue.
Hi,
url_for_file_column @variable, ''name'', takes an instance variable. My
question is, what if I don''t want to have to retrieve the instance variable
every single time but I have the image id, along with its name with me.
Could I contruct that object in a view and pass it to url_for_file_column:
<% @picture = Picture.new %>
@picture.id = ...
2006 Jun 05
1
file_column permissions
this is getting frustrating...
i installed file_column without a hitch for the first time to just play
around with. using the exact same steps as before, i try to use it with
one of my actual applications, and i get "permission denied" errors. i
figure there might be some conflict with my application so just for
kicks i do the exact same thing i did the first time to test
2006 Jul 30
1
FileColumn - Validate Before Saving
file_column is great -- but I need a way to run through the validations
(ie: validates_file_format_of) before saving. That is, when a user first
uploads an image it is displayed in the view but not ''saved'' until they
click the ''Save'' button on the form. I want to display an error
message/disable the ''Save'' button if the file they just
2006 Jul 20
1
file_column - assigning with an actual file rather than a multipart
Hi there,
I''m using the wonderful file_column and have struck an issue that
someone might have seen before.
My images already sit on the server. So, instead of passing a
multipart message I''m sending a file object.
Something like...
f = File.new("public/gallery_images/builder.png")
p = Product.find_first
p.image = f
p.save
On the save I recieve an error which
2006 Feb 13
3
file_column: uninitialized constant Magick
I am getting this following error when using file_column with RMagick:
uninitialized constant Magick
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/
active_support/dependencies.rb:200:in `const_missing''
./script/../config/../vendor/plugins/rails_file_column/plugins/
file_column/branches/kyle/lib/file_column.rb:621:in `file_column''
2006 Jul 13
0
file_column
Hello all, another rails newbie here.
I''m working on an project to simply upload pictures with some extra
information, I was able to get uploads working thanks to file_column,
however, a couple things are troubling me. First of all, according to
the file_column website, displaying images should go like this:
<%= image_tag url_for_file_column("entry", "image")
2006 Jan 17
3
file_column :root_path question.
I''m developing on Windows and deploying to FreeBSD+lighttpd using
Switchtower and I''ve got things generally working. My problem now is
that file_column data gets zapped every time I deploy, because
Switchtower creates a whole new myapp/public directory with each rev.
I looked through the file_column docs and found the :root_path option,
which I use in my models as follows:
2006 Jan 23
3
Clearing a file_column-type field
So I am now able to set/upload an image to my app using file_column,
with a little bit of a change to the code.
I can change the image using an Edit page, but I''m trying to figure out
what to do if the user wants to remove the image. I tried adding a
Remove Image link in my list, but I''m not sure what to do in the
remove_image method in my controller. I tried setting the