[Rails] What's the best way to embed a form?: Header showing
multiple times?
softwareengineer 99
softwareengineer99 at yahoo.com
Sat Feb 4 22:53:42 GMT 2006
Thank you Xavier for your reply:
Here is the views/member/login_form.rhtml (edited for html)
<%= head_helper %>
<%= start_form_tag_helper %>
<%= form_input :text_field, "login", :size => 30 %><br/>
<%= form_input :password_field, "password", :size => 30 %><br/>
<%= button_helper 'login' %>
<%= link_helper 'login_signup', :action => 'signup' %> |
<%= link_helper 'login_forgot_password', :action => 'forgot_password' %>
<%= end_form_tag %>
The following is the line in views/tags/show.html
<%= render_component :controller => "member", :action => "login_form"%>
If I change the above line back to login, I don't get the exception error.
Here are the lines from member_controller.rb
def login_form
return if generate_blank
@member = Member.new(@params['member'])
if @session['member'] = Member.authenticate(@params['member']['login'], @params['member']['password'])
flash['notice'] = l(:member_login_succeeded)
redirect_back_or_default :action => 'welcome'
else
@login = @params['member']['login']
flash.now['message'] = l(:member_login_failed)
end
render :layout => false
end
Unfortunately, since I ported my app to use SVN, I don't have access to log contents either (an issue I am working on fixing).
If there is anything else that you would like to see, please let me know.
Once again, thank you very much for your assistance.
Frank
> What am I missing?
Can you send the smallest relevant code snippets?
-- fxn
_______________________________________________
Rails mailing list
Rails at lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails
---------------------------------
Brings words and photos together (easily) with
PhotoMail - it's free and works with Yahoo! Mail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060204/9b0c606e/attachment.html
More information about the Rails
mailing list