2010/12/2 Leonel *.* li...@ruby-forum.com
So instead of
respond_to do |format|
if @user.update_attributes(params[:user])
flash[:notice] = 'User was successfully updated.'
format.html { redirect_to(:action = 'edit') }
Thanks a lot guys. Yes, I'll try to understand Ruby syntax more. I
studied the PDF of the unfinished version of the new Agile Web
Development with Rails. After that, I bought the pickaxe Programming
Ruby 1.9 book and I'm barely getting into it.
Thanks
--
Posted via
Thanks :) I just removed the XML part and yes I did notice I had the
flash in the wrong position haha.
What do you mean by I am not sure if you really want to conditional
processing of HTTP?
I'm sorry if the question seems very basic, I'm barely getting familiar
with Ruby.
--
Posted via
So instead of
respond_to do |format|
if @user.update_attributes(params[:user])
flash[:notice] = 'User was successfully updated.'
format.html { redirect_to(:action = 'edit') }
else
flash[:error] = 'User was not
Leonel *.* wrote in post #965703:
[...]
I had the respond_to block because that's how it was programmed by the
scaffold and wasn't sure if I should remove it or not.
Yet another reason not to use scaffolding: it generates a lot of junk
that you won't understand if you're a beginner and you
Leonel *.* wrote in post #965703:
So instead of
respond_to do |format|
if @user.update_attributes(params[:user])
flash[:notice] = 'User was successfully updated.'
format.html { redirect_to(:action = 'edit') }
else
Marnen Laibow-Koser wrote in post #965706:
Leonel *.* wrote in post #965703:
So instead of
respond_to do |format|
if @user.update_attributes(params[:user])
flash[:notice] = 'User was successfully updated.'
format.html {
Leonel *.* wrote in post #965713:
Marnen Laibow-Koser wrote in post #965706:
Leonel *.* wrote in post #965703:
So instead of
respond_to do |format|
if @user.update_attributes(params[:user])
flash[:notice] = 'User was successfully
ALRIGHT!! AWESOME!!!
Simple and it works!
I did this...
flash[:notice] = 'User was successfully updated.'
respond_to do |format|
if @user.update_attributes(params[:user])
format.html { redirect_to(:action = 'edit') }
format.xml { head :ok }
else
...
Thanks Colin!
--
Posted via
On Dec 1, 11:12 am, Leonel *.* li...@ruby-forum.com wrote:
ALRIGHT!! AWESOME!!!
Simple and it works!
I did this...
flash[:notice] = 'User was successfully updated.'
respond_to do |format|
if @user.update_attributes(params[:user])
format.html { redirect_to(:action = 'edit') }
Le 1 décembre 2010 18:12:01 UTC+2, Leonel *.* li...@ruby-forum.com a
écrit :
ALRIGHT!! AWESOME!!!
Simple and it works!
I did this...
flash[:notice] = 'User was successfully updated.'
respond_to do |format|
if @user.update_attributes(params[:user])
format.html { redirect_to(:action
11 matches
Mail list logo