Me voila :)

j'ai converti ça :

acts_as_state_machine :initial => :pending
>   state :pending
>   state :converting
>   state :converted, :enter => :set_new_filename
>   state :error
>   
>   event :convert do
>     transitions :from => :pending, :to => :converting
>   end
>   
>   event :converted do
>     transitions :from => :converting, :to => :converted
>   end
>   
>   event :failed do
>     transitions :from => :converting, :to => :error
>   end
>
>
en ça (j'ai suivi la doc):

state_machine :initial => :pending do
>
> state :pending
>
> state :converting
>
> state :converted, :enter => :set_new_filename
>
> state :error
>
>
>> event :convert do
>
> transition :from => :pending, :to => :converting
>
> end
>
>
>> event :converted do
>
> transition :from => :converting, :to => :converted
>
> end
>
>
>> event :failed do
>
> transition :from => :converting, :to => :error
>
> end
>
>   end
>
>
Et j'ai le droit a un invalid keys :(

D'autre part j'ai une autre erreur ici 

def create

    @video = Video.new(params[:video])
    if @video.save
      @video.convert
      flash[:notice] = 'Video has been uploaded'
      redirect_to :action => 'index'
    else
      render :action => 'new'
    end
  end

 Il n'accepte pas les save car mon code ressemble a celui la : 

def create
>
> @event = Event.find(params[:event_id])
>
> # @video = @event.videos.create(params[:video])
>
> @video = @event.videos
>
> if @video.save
>
> @video.convert
>
> flash[:notice] = 'Video has been uploaded'
>
> redirect_to :action => 'index'
>
> else
>
> render :action => 'new'
>
> end
>
> redirect_to event_path(@event)
>
> end
>
>
Je vous serais reconnaissant :)

Merci 

-- 
Vous avez reçu ce message, car vous êtes abonné au groupe "Railsfrance" de 
Google Groups.
Pour transmettre des messages à ce groupe, envoyez un e-mail à l'adresse 
[email protected]
Pour résilier votre abonnement envoyez un e-mail à l'adresse 
[email protected]

Répondre à