[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Best way of storing attachements/images

antony

7/26/2006 4:39:00 PM

I'm building a webshop and i'm stuck with a specific task. I'm using
rails.

I have a form for adding a new product. In the form there's a portion
for image upload.
I want to provide my client with a way of adding images to his product
and returning to the same folder with the fields he's filled in still
filled in.

Form -> Add image -> Returns to the form displaying the images that
will be added to this form.
Form -> Submit -> Saves the product and the images.

I've looked at both file_column and acts_as_attachement plugins but
it's the specific form re-view that I don't know how to solve.

Thank you in advance.

65 Answers

Jano Svitok

7/26/2006 5:55:00 PM

0

I'm not sure if Iunderstood you correctly... anyway if what's you're
trying to achieve is to upload images *without* clearing/resetting the
form via page reload, try using ajax to add images to the form (see
e.g. http://api.rubyonrails.com/classes/ActionView/Helpers/PrototypeH...),
and "normal way" to select one of them afterwards.

Maybe you'd ask directly on rails list
(http://lists.rubyonrails.org/mailman/list...) - they'll
probably know better.

J.

On 7/26/06, antony@icap.se <antony@icap.se> wrote:
> I'm building a webshop and i'm stuck with a specific task. I'm using
> rails.
>
> I have a form for adding a new product. In the form there's a portion
> for image upload.
> I want to provide my client with a way of adding images to his product
> and returning to the same folder with the fields he's filled in still
> filled in.
>
> Form -> Add image -> Returns to the form displaying the images that
> will be added to this form.
> Form -> Submit -> Saves the product and the images.
>
> I've looked at both file_column and acts_as_attachement plugins but
> it's the specific form re-view that I don't know how to solve.
>
> Thank you in advance.
>
>
>

Robert Peffers

2/3/2008 1:17:00 AM

0

"Ex-Pat Andy" <andy@the-ashworths.org.uk> wrote in message
news:rg8pj.1841$5M1.684@newsfe23.lga...
>
> "Robert Peffers" <peffers50@btinternet.com> wrote in message
> news:FbidneKBoYNHQDnanZ2dneKdnZydnZ2d@bt.com...
>
>> Just what kind of World do these strange ban everything people inhabit?
>
> Britain! :)
>
> --
> Andy

Britain is not a World - it is four countries.

The Horny Goat

2/3/2008 1:59:00 AM

0

On Sat, 2 Feb 2008 21:17:14 -0000, "Robert Peffers"
<peffers50@btinternet.com> wrote:

>Until that, not too great novel, and the none too great films there was
>nothing whatsoever wrong with the name Lolita.
>Yet now they are attempting to say every mention of it has to be connected
>with that rather boring novel and picture.
>Tell me, do those parents think all mentions of Tim refer to a crippled
>child?
>Every Wendy is the friend of Peter Pan?
>Every Peter never grows-up?
>Every collie is called Lassie?

Still - how many people in 2008 name their kids Adolf or Hannibal?

Both perfectly reasonable names with plenty of people who bore the
name having achieved plenty - but one notorious example threw each
name into disrepute.

I'm chiefly surprised the Woolworth's purchasing agents had not heard
of Nabokov's novel.

Andrew Swallow

2/3/2008 2:33:00 AM

0

The Horny Goat wrote:
[snip]


> I'm chiefly surprised the Woolworth's purchasing agents had not heard
> of Nabokov's novel.

I do not beleive them. The purchasing agents probably just laughed
at the name and then puts the goods on sale. Now they are just saying
"Not guilty your Honour."

Andrew Swallow

jJim McLaughlin

2/3/2008 2:40:00 AM

0

Robert Peffers wrote:


DELETED CRAP

Stop crossposting your crap to sci.ilitary.naval you drunken old fool.

Tiger

2/3/2008 2:46:00 AM

0

Robert Peffers wrote:
> "Ex-Pat Andy" <andy@the-ashworths.org.uk> wrote in message
> news:rg8pj.1841$5M1.684@newsfe23.lga...
>
>>
>> "Robert Peffers" <peffers50@btinternet.com> wrote in message
>> news:FbidneKBoYNHQDnanZ2dneKdnZydnZ2d@bt.com...
>>
>>> Just what kind of World do these strange ban everything people inhabit?
>>
>>
>> Britain! :)
>>
>> --
>> Andy
>
>
> Britain is not a World - it is four countries.
>

Once upon a time they owned most of the world.

Robert Peffers

2/3/2008 3:15:00 AM

0

"Andrew Swallow" <am.swallow@btinternet.com> wrote in message
news:t5idneJdmsR_ujjanZ2dnUVZ8h-dnZ2d@bt.com...
> The Horny Goat wrote:
> [snip]
>
>
>> I'm chiefly surprised the Woolworth's purchasing agents had not heard
>> of Nabokov's novel.
>
> I do not beleive them. The purchasing agents probably just laughed
> at the name and then puts the goods on sale. Now they are just saying
> "Not guilty your Honour."
>
> Andrew Swallow

The point is that, if they made no silly connection, why would they find
anything strange?
There is not a given name that has not been used in a book, play or film
somewhere along the line and people do not automatically make connections
between the given names and works of fiction.
Why should this particular name be any different?
We get all sorts of names and such as Pandora seem acceptable yet the story
is that Pandora opened the box that let all the ills of the World out to
inflict us.
So, again, why should this particular name make people agitate to have what
seems to be a decent product banned?
Seems to me the fault exists in the overly dirty minds of those who would
ban a good product because of its name.
Let me quote the Shakespeare take on this matter, "What's in a name? That
which we call a rose by any other name would smell as sweet".

--
The real Auld Bob Peffers,
Kelty,
Fife,
Scotland, (UK).

Ex-Pat Andy

2/3/2008 4:10:00 AM

0


"Robert Peffers" <peffers50@btinternet.com> wrote in message
news:YZydnbK9V9WNizjanZ2dneKdnZydnZ2d@bt.com...
> "Ex-Pat Andy" <andy@the-ashworths.org.uk> wrote in message
> news:rg8pj.1841$5M1.684@newsfe23.lga...
>>
>> "Robert Peffers" <peffers50@btinternet.com> wrote in message
>> news:FbidneKBoYNHQDnanZ2dneKdnZydnZ2d@bt.com...
>>
>>> Just what kind of World do these strange ban everything people inhabit?
>>
>> Britain! :)
>>
>> --
>> Andy
>
> Britain is not a World - it is four countries.

Technically, Wales is not a country its a principality therefore your count
is wrong :)

Irrespective, many of these PC clowns and / or risk averse health and safety
pedants are inhabitants of England, Scotland, Ireland and Wales and are
stifling the creativity of a once great world power.

--
Andy

The Horny Goat

2/3/2008 5:01:00 AM

0

On Sun, 03 Feb 2008 02:33:08 +0000, Andrew Swallow
<am.swallow@btinternet.com> wrote:

>The Horny Goat wrote:
>> I'm chiefly surprised the Woolworth's purchasing agents had not heard
>> of Nabokov's novel.
>
>I do not beleive them. The purchasing agents probably just laughed
>at the name and then puts the goods on sale. Now they are just saying
>"Not guilty your Honour."

If they're young enough I suppose - my eldest is a college junior
honors history student but I somehow manage to surprise her with
tidbits on a regular basis. It's not lack of smarts but lack of life
experience.

She gets jokes like "What's the difference between Jane Fonda and Bill
Clinton?" (Answer - ROT-13'd - "Bayl bar bs gur jrag gb Ivrganz") but
had never heard of HR Haldeman though she knew a barebones version of
Watergate.

fred

2/3/2008 8:19:00 AM

0

Ex-Pat Andy wrote:
>
> "Robert Peffers" <peffers50@btinternet.com> wrote in message
> news:YZydnbK9V9WNizjanZ2dneKdnZydnZ2d@bt.com...
>> "Ex-Pat Andy" <andy@the-ashworths.org.uk> wrote in message
>> news:rg8pj.1841$5M1.684@newsfe23.lga...
>>>
>>> "Robert Peffers" <peffers50@btinternet.com> wrote in message
>>> news:FbidneKBoYNHQDnanZ2dneKdnZydnZ2d@bt.com...
>>>
>>>> Just what kind of World do these strange ban everything people inhabit?
>>>
>>> Britain! :)
>>>
>>> --
>>> Andy
>>
>> Britain is not a World - it is four countries.
>
> Technically, Wales is not a country its a principality therefore your
> count is wrong :)

And Northern Ireland isn't part of Britain.