[Rails] What's the best way to embed a form?: Header showing multiple times?

softwareengineer 99 softwareengineer99 at yahoo.com
Sat Feb 4 22:57:51 GMT 2006


I was able to get access to logs using the webrick server and the following is an excerpt:
  
  
  
  Processing MemberController#login_form (for 151.213.150.183 at 2006-02-04 15:50:05) [GET]
    Parameters: {"action"=>"login_form", "id"=>nil, "controller"=>"member"}
  Redirected to http://accounting.adoppt.com:3000/member/login
  Filter chain halted as [login_required] returned false
  Completed in 0.00104 (961 reqs/sec) | DB: 0.00000 (0%) | 302 Found [http://accounting.adoppt.com/tag/business]
  Start rendering component ({:controller=>"/member", :action=>"login"}):
  
  
  ActionView::TemplateError ("::MemberController" is not a valid constant name!) on line #9 of app/views/tags/show.rhtml:
  6:
  7:
  8:
  9: <%= render_component :controller => "member",  :action => "login_form"%>
  10:
  11: <table class="main" align="center">
  12:
  
  
  I appreciate your assistance.
  
  Thanks
  Frank

softwareengineer 99 <softwareengineer99 at yahoo.com> wrote:  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 :contro   ller   => "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 acce   ss 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._______________________________________________
Rails mailing list
Rails at lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails


		
---------------------------------
Relax. Yahoo! Mail virus scanning helps detect nasty viruses!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060204/4d2dfd30/attachment.html


More information about the Rails mailing list