Processing ClubsController#edit (for 127.0.0.1 at 2010-08-15 20:44:40)
[GET]
Parameters: {"id"=>"22"}
[4;36;1mClub Load (1.0ms) [0m[0;1mSELECT * FROM "clubs" WHERE
("clubs"."club_id" = 22) [0m
Rendering template within layouts/clubs
Rendering clubs/edit
Completed in 39ms (View: 29, DB: 1)
I removed my previous posts to keep this simple. I have an
implementation as so:
club Model
class Club < ActiveRecord::Base
# include Magick
set_primary_key "club_id"
def logo_bigg=(input_data)
self.filename = input_data.original_filename
self.content_type = input_data.conte
I'm thinking maybe I should treat it as a separate form for just the
picture upload. I think the problems could be when it tries to pass
all those variables at once once I hit submit on the form.
On Aug 10, 9:41 pm, Xenio wrote:
> So I changed my implentatio so that its set up as so:
>
> The edit
So I changed my implentatio so that its set up as so:
The edit view:
<% form_for(@club, :html=>{:multipart=>true}) do |f| %>
<%= f.error_messages %>
<%= f.file_field :logo_bigg %>
<%= f.label :phone %>
<%= f.text_field :phone %>
<%= f.label :shortdesc %>
<%= f.text_
On 10 August 2010 13:18, Xenio wrote:
> Hey Chris,
>
> I think I sent a reply to just you by mistake. Is there anyway you can
> post it here? Apparently I do not get copies of messages sent to
> author only in google groups.
It will be in your Sent Items or whatever it is called in your mailer.
Hey Chris,
I think I sent a reply to just you by mistake. Is there anyway you can
post it here? Apparently I do not get copies of messages sent to
author only in google groups.
On Aug 9, 5:13 am, Chris Mear wrote:
> On 9 August 2010 00:15, Xenio wrote:
>
>
>
> > On Aug 8, 4:48 pm, Xenio wrote:
Xenio wrote:
> I have a DB that is already populated with data. There is a table
> called clubs that has an logo_big field set up as a blob. I have
> successfully used send_data to display the jpg pictures as I need them
> in the views. I just need to setup the edit/new view to enable me to
> uploa
On 9 August 2010 00:15, Xenio wrote:
> On Aug 8, 4:48 pm, Xenio wrote:
>> I have a DB that is already populated with data. There is a table
>> called clubs that has an logo_big field set up as a blob. I have
>> successfully used send_data to display the jpg pictures as I need them
>> in the views
In my controller I have:
# PUT /clubs/1
# PUT /clubs/1.xml
def update
@club = Club.find(params[:id])
if params[:club][:logo_big] && params[:club][:logo_big].size > 0
@club.logo_big = params[:club][:logo_big].read
end
respond_to do |format|
if @club.update_att
9 matches
Mail list logo