similar to: Stupid? question about if else logic

Displaying 20 results from an estimated 1000 matches similar to: "Stupid? question about if else logic"

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/.
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 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 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
2005 Oct 04
3
[Q] file_column help needed
Hi all, I''m trying to use file_column to upload a picture but I''m getting the following error: "cannot convert nil into String" caused by the last line in FileColumnHelper::url_for_file_column(object_name, method) url << object.send("#{method}_relative_path") I don''t have any images uploaded for existing entries so does this not
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
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 06
3
image replacement (new Effect.*****) problem
Here''s what I''m trying to do. I have two divs, one holds about 20 small images of products and the other holds a single large image of one of the products. I''m trying to use the jazzy "new Effect." way of changing images but I can''t seem to get it too work. My script is replacing the image and then making the element disappear. What
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 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",
2006 Mar 08
2
fade out and then fade in....how to make it work?
I''m trying to have one image fade out and then another slidedown upon completion of the ajax call. I can''t get the timing correct. How do you do it? Here''s what I''m trying (this does not work) <%= link_to_remote(image_tag(url_for_file_column(product, "image_url"), :update => ''right_content'', :url => {
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 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 Jul 02
3
difficult view code logic
this one really has me stumped... <%= user.in_out == "In" ? {image_tag url_for_file_column("personnel", "image", "thumb")} if user.image : user.in_out %> What I am wanting to do... if user.in_out == "In", load their thumbnail if it exists, load public/images/in.jpg if not, or else load public/images/out.jpg Can someone help with the
2008 Sep 15
1
url_for_file_column within if within a partial
I have a partial that has the following code: <% if product.prd_big_image.nil? %> <img alt="Image" src="/images/empty.jpg"> <% else %> <%= image_tag url_for_file_column(:product, :prd_big_image, "normal") %> <% end %> and get the following error You have a nil object when you didn''t expect it! The error occurred while
2005 Dec 17
13
Rookie with ActionMailer
To start out I''ll say that this is the first thing that I''ve ever built that''s been intended to programmatically send email. I''m looking at examples in AWR and also on the wiki. I feel that I sort of have things set up right but I''m getting an error I can''t grok: Net::SMTPFatalError in Home#email_list 550 5.7.1 Unable to relay for
2006 Jun 15
9
MySQL error
Greetings, I''ve got a Rimu account and I''m trying to config things for a deployment. I''ve now got things to where I''m atleast getting a nice error page you can see at: http://www.juiceboxmedia.ca/public/ the username and password I have connects to this database fine with phpmyadmin from my plesk control panel, so as far as I know MySQL on it''s
2006 Jun 13
7
help with ''error_messages_for''
Greetings, I''m in the throws of deploying an app on site5, and I''m getting strange errors. I think I might need to understand how error_messages_for works. I get a pretty standard looking error: " You have a nil object when you didn''t expect it! You might have expected an instance of ActiveRecord::Base. The error occured while evaluating nil.errors Extracted
2006 Apr 03
11
Rails VPS Business Hosting
Greetings, Does anyone have experience with Rails VPS hosting? I''m basically looking for a hosting reseller option so I can have control of my clients domains and hosting. I''m looking for something easy to use; although I like learning it all, and am learning a lot, I am most definitely not a command line linux user type as of yet. The one that I''ve looked at
2005 Sep 14
4
How to drag/drop visitable anchors ?
Hi ! I have the following: <li id="photo_<%= @photo.id %>" class="photo"> <%= link_to(image_tag(url_for_file_column(:photo, :picture)), {:action => ''photo'', :id => @photo}, {:title => @photo.description}) %> </li> <script type="text/javascript" language="JavaScript"><!--