Displaying 20 results from an estimated 4000 matches similar to: "possible bug: edge rails, nested resources and images"
2006 Jan 10
3
multiple items on 1 column
Hello,
I am trying to put multiple items in one column and can''t seem to get
the syntax right.
These are images and the image url''s are being pulled from a database.
It seems that <tr></tr> is the trigger to go onto the next item.
Here is the code from the controller:
def list
@items = Item.find_all
end
Here is the code from list.rhtml file:
<%
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
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 Mar 05
2
How to clean up this code?
Hi!
I''ve got 2 tables: products and images. Product has_many images, image
belongs_to product. In images table i store product_id and name of the
image (not the image itself).
I''ve created a single form, where user can add any number of images for
a
product he/she is creating (new fields are created using javascript).
The images that are uploaded are saved to public/images
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
2
ruby embedded code replacement for onclick in link?
Is there a ruby embedded code replacement for something like this?
<a href="#" onclick="window.open(''http://192.168.78.12:3000/portfolio/show/<%=
item.id %>'', ''test'', ''width=660, height=500,resizable=no'')">
<%= image_tag item.image_url, :size => ''200x150'' %></a>
Thanks,
Dan
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 Oct 13
1
Edge rails, single table inheritance and keeping multiple classes in a single file
So is the official stance as per edge rails that multiple class
definitions must go into separate files? I was trying to use STI with
acts_as_attachment, to have all my attachment classes go into a single
file, for example:
attachment.rb
class Attachment < ActiveRecord::Base
end
class UserPicture < Attachment
belongs_to :user, :foreign_key => ''owner_id''
2007 Feb 08
1
Diffrerence in "%in%" function to boundry setting via <>
Hi,
There is a point which is irritating me currently quite a bit and that is an
aspect of different behaviour between the %in% function and the
smaller/bigger than signs (<>). Here is are two examples to demonstrate what
I mean:
Example1:
> c(1,1,2,2,3,4,4,6,7) %in% c(1,2,3)
[1] TRUE TRUE TRUE TRUE TRUE FALSE FALSE FALSE FALSE
Right, that is what I expect.
Example2:
> ps
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
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
2008 Apr 24
7
Please help. The error occurred while evaluating nil.name
Okay so heres my code which works fine, i''ll explain the problem
below.
<% for num in 1..-04Gazou6+pmm/bHYDwDEOA@public.gmane.org %>
<table class="products" id="table1" cellspacing="2" cellpadding="3"
border="3">
<tr>
<td>
<table width="25%">
<tr>
<tr>
<td><%=
2006 Sep 08
4
Does acts_as_attachment :storage => :db_system work?
I found the post about needing to install acts_as_attachement_1_1_6 if
you are not on edge rails. But I am having trouble getting db_system
storage to work. As far as I can tell in from the database, things are
working, but I don''t see how my model table hooks up with the db_files
table so I am having trouble altering the image_tag from the tutorial
2011 Dec 26
1
Learning Ruby on Rails 3.1 - deployment - Error (cs.jpg isn't precompiled)
Hi guys,
I''ve followed the Agile Web Development with Rails book and I''m up to
deployment. I started a Ubuntu 10.1 LTS server on Amazon EC2 for
testing, got Apache 2, mysql, rvm, ruby 1.9.2, rails 3.1 and phusion
passenger up and running as per the book.
When I come to running the actual site, it says "We''re sorry, but
something went wrong."
In
2008 Oct 09
1
YALAQ - Yet Another LApply Question
Hello,
Two lapply questions (system info and sample data below):
1) Why does the first form of command1 add the name of y _after_ the
str() output rather than before as does the second (preferred) form?
# command1 version1
invisible(lapply(ls(pattern='bn'), function(y) cat(y, "\n",
str(get(y)), "\n") ))
# command1 version2 (preferred output)
2007 Aug 18
0
RSpec and acts_as_attachment
Hey guys,
I''m getting a weird error when trying to test something like the
following. It''s a model that is using acts_as_attachment but the
weird thing is the equivalent Test::Unit case passes. Does anyone
have any ideas?
Best,
Dave
# it was a Test::Unit case first
def test_should_be_invalid_without_file
UserFile.any_instance.expects(:with_image).never
2006 Oct 12
3
Help with observer_form , javascript error
I''ve set up an observer form, it is not working nor throwing error at least
in loading the page.
The Firefox javascript console is showing this error:
Error: missing } after property list
Source File: http://localhost:3000/ajaxsearch/list
Line: 165, Column: 45
Source Code:
hide(''roller'')}, parameters:''Form.serialize(''asearch'')='' +
2007 Feb 22
0
Cropping images with RMagick after uploading with acts_as_attachment
Hi,
I''m using acts_as_attachment to create thumbnails in a filesystem (no
problem there), but I''m having a rough time figuring out how modify
the image to crop it, and then put it back into the filesystem.
I think that I can pull the image OK and modify the Image OK with
RMagick.
So really I just need a pointer on putting it back into the filesystem
as a modified thumbnail,
2006 Sep 26
0
some help with functional testing of nested routes
I have the following functional test in test/functional for testing my
products_controller:
require File.dirname(__FILE__) + ''/../test_helper''
require ''products_controller''
# Re-raise errors caught by the controller.
class ProductsController
def rescue_action(e)
raise e
end
end
class ProductsControllerTest < Test::Unit::TestCase
fixtures
2009 Apr 27
0
how to get acts_as_versioned able to delete only selected ve
Hello everyone
i''m working on uploading file by using attachment_fu and
acts_as_versioned
so the problem is i can''t delete only selected version
for example ;
i have file a.txt and this file have 5 version each version is viewable
( that mean you can view version 1 , version 2 , version 3
.............. )
a.txt ( version1 )
a.txt ( version2)
a.txt ( version3 )
a.txt (