Displaying 20 results from an estimated 2000 matches similar to: "[file_column] Problem displaying images after upload"
2006 Jan 19
2
NOOB: Using locals to pass data to a SQL query
I want to show a users entries based on there login id. I have tried
this:
View:
<div id="myfish">
<%= render :partial => ''myfish'', :locals => {:user => session
[:user].id } %>
</div>
Partial:
<% for entry in @entries %>
<table border ="0" CELLSPACING="0">
<tr class="<%= alternate
2006 Jan 10
0
find_by_sql + partials question
Ok now that I have find_by_sql love working for my "Top 10 List" I
want to make them a bit more DRY. Tis is what I have so far:
Model:
def self.topfish
find_by_sql["select species.name,
length,species.multiplier*length as score,caught_on from entries join
species on species_id = species.id where species_id = ? order by
score DESC LIMIT 10", species]
2006 Jan 19
8
I can''t figure out how to solve this one
I am creating an application to run a fishing tournament (see http://
www.ruby-forum.com/topic/51209 for a little background)
Now I am running into an issue trying to calculate a leader board.
each participate can enter multiple fish but only the largest fish
per a given species counts towards the overall score. My entries
table looks like this:
2006 Jan 12
1
methods for file_column
how do i find the available methods available to my objects in file_column ?
I noticed that i can do
@post.image_relative_path
for my @post object to retreive the relative path. What are all the
other options available to my objects thru file_column ?
thanks
adam
2006 Apr 22
1
using file_column
I''m trying out this recipe from the Rails Recipes book (the tagging one) but
I''m also trying to use file_column to handle the uploading of pictures.
Basically I think the problem is I''m not using an instance variable in the
view''s partial that shows the details of my item. Off of my original
list.rhtml page I have a
<%= render :partial =>
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 Jan 16
6
file_column plugin error
Hi,
I downloaded FileColumn plugin and love the concept.
But when I tried the example listed on the plugin web
site, I got the following
error:
NoMethodError in Entry#new
undefined method `file_column'' for Entry:Class
My environement is Red Hat linux 9.0 with mysql 4.1. I
installed file_column under vendor/plugins. If I run
"ls", I get the following directories:
2006 Jan 12
2
file_column issue: file upload fails without error
environment:
Locomotive + Rails 1.0 Max
Lighttpd 1.4.8, FastCGI 2.4.0
Ruby 1.8.2
File_column version: 0.3.1
Path to file_column: /vendor/plugins/file-column/
symptom:
Uploading a file using file_column fails; no file is uploaded and the
"filename" column remains blank. No error messages are produced - a new
record is created with blank filename.
code and log here:
2006 Jul 14
2
watermark with file_colum
Is this possible?
I see rmajick allows for a image.stenago( watermark=>''myimage.gif'')
Anyone have any ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060714/6e9af7a6/attachment.html
2007 Nov 16
4
Newb - variable returns # sign?
Hi Gurus-
I want to return the variety from the species table based on the
active record link to inventory table
class Species < ActiveRecord::Base
has_many :inventories
end
class Inventory < ActiveRecord::Base
belongs_to :species (this is the singular and the plural, so that''s
OK)
end
My inventory_controller looks like:
def show
@inventory =
2006 May 12
3
file_column error
Hmm, I''m using file_column and going by this tutorial, the files upload
ok and I can see the fields updated in the database, but I am getting
this error:
"Trying to access file_column, but primary key got lost."
Thanks in advance
--
Posted via http://www.ruby-forum.com/.
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 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 May 24
3
delete image through plugin file_column ?
how can i delete image through plugin file_column?
--
Posted via http://www.ruby-forum.com/.
2006 May 09
3
File_Column Development Dead?
I''m curious if anyone knows if development on the file_column plug in is
continuing? I''ve seen some SVN commits from awhile back but no binary
releases.
Did Sebastian speak at Canada on Rails? Anyone catch that?
What is the future of file_column?
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 Jan 09
5
file_column content type
is there a way using the file_column plugin to enforce a certain
content type based on regex (i.ie, /^image/) and/or filesize (150k)
?
thanks
adam
2006 Aug 17
3
file_column plugin + rails 1.1.6
Hello,
I need to install file_column plugin but I got an error message.
This is the command I use:
./script/plugin install
http://opensvn.csie.org/rails_file_column/plugins/file_column/trunk
This is the error:
Cannot find gem for Rails =1.1.4:
Install the missing gem with ''gem install -v=1.1.4 rails'', or
change environment.rb to define RAILS_GEM_VERSION with your
2006 Apr 08
5
file_column
hello,
how to generate new image if i do add new version? For example, I add
version :small => { :size => "320x240" } .
How to tell file_column to generate new image version if image is
allready uploaded ?
Thank you!
--
Posted via http://www.ruby-forum.com/.
2006 Mar 02
2
How to get mime extension with file_column
Is there a way to get the MIME extension of a file_column field?
Here''s what I want to do (look for comment in before_save method):
class ProductFile < ActiveRecord::Base
belongs_to :product
file_column :file_name
def before_save
self.file_type = # something that returns the MIME type (e.g. image/jpeg)
end
end
TIA