Displaying 20 results from an estimated 1000 matches similar to: "file column inserts wrong file url field into database"
2006 Jan 19
0
file_column error: tmp file created but not actual
Hi
When I submit the form with field_column, the actual
image is not
uploaded, only temp files are crreated and I dont see
actual file created and the image file name is not in
the database and get "fieldWithErrors". Then if
submit again, the actual file in created and an
database record is generated.
Here is the log file. I print @params and @wallpaper.
I find the following:
1st
2006 Jan 11
1
fiile_column persistent across different forms
is there a way to keep the file_column field in the form persistent
across diffferent view templates ?
In my controller (same controller for both views) i do
@post = Post.new
in the view i do
form_step1.rhtml
---------------------
<%= file_column_field "post", "image" %>
<% if @post["image"] %>
<%= image_tag url_for_file_column("post",
2010 Mar 20
0
Problem with videos on heroku
Hi,
I have recently moved my RoR app on the Heroku platform, and almost
everything works fine apart from the videos. It works fine when my app
runs in local but not on heroku. This is the error log I''m getting, if
anyone knows where it can be coming from:
Processing VideosController#new (for IP at 2010-03-20 04:32:09) [GET]
Session ID: 6abecf60c3369d7c7029e366bb801e08
Parameters:
2007 Aug 18
1
problem with file_column url generator
Hi,
I have the following in a viewer
Here, @lst = Homework.find(:all) is an array of homeworks. I checked
this this is correct.
Based on the error below, somehow, the url_for_file_colum does not
like to act on the model element.
I checked the source code to url_for_file_column, and the problem is
with instance_variable_get().
I have no idea wat is going on! Any help is appreciated. Gordon.
2006 Jan 03
3
file_column howto (beginner)
I''m trying to use file_column as a Rails plugin.
Of course I read the doc (from Sebastian, this maillist) and little
bit of source (as good as I, newbie, could understand it)..
But I''m not able to implement it in my app.. I''m a totally newbie with
less software development experience.
I get the file_column_field in my view with simply invoking the
helper... (:multipart
2005 Dec 29
3
FileColumn Help
i''ve changed store_dir to :store_dir => "public/uploads/users/pictures/"
that works great for uploading, but url_for_file_column is still
outputting:
/user_picture/image/id/name.jpg
how do i make url_for_file_column output the correct url?
--
Posted via http://www.ruby-forum.com/.
2006 Jan 17
5
file_column mangling URL
Hey,
I''ve gotten file_column to upload a file, drop it in the dynamic
directory, but I can''t display the image, the directories repeat
themselves:
My model:
class Person < ActiveRecord::Base
file_column :image_url
In my view:
<%= image_tag url_for_file_column(''person'', ''image_url'') %>
HTML generated is this:
<img
2006 Apr 28
2
file_column with polymorphic table relationship?
Hello,
I''m just starting out with both Rails and Ruby, so I hope this isn''t too
simple of a question - but I''ve been struggling to find a solution.
I''m using the file_column plugin to handle image uploads and thumbnail
generation. In addition, I''ve wrapped the image into a polymorphic table
so I can have uploaded images associated with multiple
2005 Oct 09
6
Problem With url_for_file_column/file_column
I am using the very helpful file_column extension in my app.
The uploading portion works great - no problems.
Where I am having an issue is displaying the images in my view. My code
looks like this:
<% for @record in @main_box_releases -%>
<%= image_tag(url_for_file_column("record", "record_cover")) %>
<% end -%
@record is an instance of a class called
2006 Jan 14
2
file_column, ActionMailer, and tests
Hi,
Say I have a model Event that has a file_column called ''pdf''.
I want to send out emails that contain the URL for the pdf file that''s
associated with the Event. I also want to test the emails, so I''d
need to be able to get at the URL for the pdf inside my unit tests.
I don''t see how I can use url_for_file_column in this situation.
Doing <%=
2006 Jan 25
1
url_for_file_column in parent model''s view
Hi All,
I am using the file_column plugin to upload images. The model that I
am using is simply called images (id, name, caption - name being the
"file" column) and it belongs_to a parent model called books which
has_many images. I was able to figure out how to enter the images
into the correct model when updating of form of the parent model
(books). Now I need to figure out
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 Mar 02
2
url_for_file_column not returning correct path
I added this test towards the end of the included
file_column_helper_test.rb that shipped with the file_column plugin:
def test_url_for_file_column_different_root_path
Entry.file_column :image, :root_path => File.join(RAILS_ROOT,
"public/files")
e = Entry.new(:image => upload(f("skanthak.png")))
assert_match %r{/public/files/entry/image},
2006 Jan 19
1
partials and instance variables for file_column
Hi,
Sebastian Kanthak of the file_column-Plugin wrote once:
"is the photo object inside a local variable or an instance variable
(e.g. photo or @photo)? url_for_file_column only works with instance
variables, like all other active record form helpers. Could this be
the problem?"
So I''m using file_column in a partial, e.g.
<%= render (:partial => "product",
2006 May 30
0
url_for_file_column and image_tag not working right together
i just got file_column working and i love it. but i''m having some
problems with the urls. my application is not in the base directory, it
is in a folder called "/testapp". when i use "image_tag" with
"url_for_file_column", i get this path:
/testapp/testapp/entry/image/3/myimage.jpg
the image is located at:
/testapp/entry/image/3/myimage.jpg
to see if
2006 Feb 10
2
file column within link_to
Hi,
I correctly see:
image_tag url_for_file_column("element", "picture_url", "medium")
now I need to make it a link so I''ve used:
<%= link_to(image_tag url_for_file_column("element", "picture_url",
"medium"), {:controller => "products", :action => "sec_level",
:level_id => @element.id}) unless
2006 Jan 08
0
link_to_remote(image_url url_for_file_column(product, "image
I apologise for bad formatting. I don''t know how to make it nice in an
email
How do you nest image_url tags into link_to_remote tags. The following
creates the error:wrong number of arguments (3 for 2)
<%= link_to_remote(image_tag url_for_file_column(product, "image_url"),
{ "class" => "small_product",
2006 Jan 17
2
file_column plugin and instance variables
To make file_column work I have to copy my local variable back to an
instance variables like this:
<% for product in @products
@product = product %>
<div class="catalogentry">
<%= image_tag url_for_file_column(''product'', ''image_url'') %></p>
This is needed because file_column specifically looks for the instance
2006 Jun 23
0
Overriding a file_column attribute in model
I have a user model subclassed into Employees and Managers using STI. I
am using FileColumn to manage images, in this case logos. If an Employee
doesn''t have a logo of its own, I want my app to use the Manager''s logo
in views.
I did the following in models/users.rb:
-------
class User < ActiveRecord::Base
file_column :logo
end
class Employee < User
belongs_to
2006 Aug 13
5
problems with file_column plugin
1) installation is not as smooth as some other plug-ins. If you follow
the instructions on
http://www.kanthak.net/opensource/file_column/
it makes a directory called trunk instead of file_column. You have to
manually rename it to file_column. I guess this is a minor annoyance but
it gives me the feeling that things aren''t quite like other plugins.
2) I get this error: undefined