Hi
Thanks for your reply. My model code is
class User < ActiveRecord::Base
acts_as_authentic
belongs_to :company
end
class Company < ActiveRecord::Base
has_many :users
accepts_nested_attributes_for :users
end
My companies controller is
def new
@company = Company.new
1.times { @company.users.build }
end
def create
@company = Company.new(params[:company])
if @company.valid_with_captcha? and @company.save
flash[:notice] = "Thanks for registering. Please login"
redirect_to login_url
else
render :action => :new
end
end
So here I have no control over save_without_session_maintenance
(Or I dont know how to do it) The problem is after this save (one
company and a user)
it is not redireted to login_url . I think some cookie is set. Can I
save company and user from the above code?
Thanks
Tom
--
Posted via http://www.ruby-forum.com/.
--
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.