Hi
I use AS in the admin backend of my application. Part of the admin
backend is the user management. Using paperclip I include the
possibility to add a user image to each user record.
No I would like to implement the possibility for the admin to crop the
user image for each user during the user create. I tried to adapt the
great railscasts screencast (# 182) using Jcrop.
I tried to use this statement to redirect to a crop page after the
user record has been added in the AS user create form
def create_respond_to_html(record)
if record.photo?
@user = User.find_by_id(record.id)
render :action => "crop"
else
super
end
end
But I am not allowed to pass the record the the create_respond_to_html
function. I also tried to use params[:id] but that didn't work either.
Is there a way to pass on the ID of the record just created?
BTW the redirect itself does work, as
def create_respond_to_html
if successful?
redirect_to root_url
else
super
end
end
indeed does send me to the root url of my application.
Any help would be greatly appreciated.
Cheers J.
--
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/activescaffold?hl=en.