I solved this in a kind of an odd way:
def create
@student = Student.new(params[:student])
respond_to do |format|
if @student.save
student_id = @student.id
@subscription = Subscription.new(:modul_id =>
params[:valasztott_training]["moduls"], :student_id => student_id)
@subscription.save
format.html { redirect_to("/hallgato/"+student_id.to_s) }
else
format.html { render :action => "new" }
end
end
en
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" 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/rubyonrails-talk?hl=en.