Under application file,i need sign up (devise) and home link( a view) links but having issue.

12 views
Skip to first unread message

jai kumar

unread,
Jan 20, 2016, 11:25:57 AM1/20/16
to Ruby on Rails: Talk
No route matches {:action=>"index", :controller=>"devise/registrations"}

my application.html.erb

  <div class ="link1">     
     <%= link_to "Home",:action => 'home' >
     </div>
     <div class ="link1">
            <% if userprof_signed_in? %>
   <%= link_to "Logout", destroy_userprof_session_path, method: :delete, :class => 'navbar-link'  %>
<% else %>
  <%= link_to "Sign up", new_userprof_registration_path, :class => 'navbar-link'  %> |
  <%= link_to "Login", new_userprof_session_path, :class => 'navbar-link'  %>
<% end %>

i am able to see home and sign up link  but when i am clicking on sign up link i am getting error:No route matches {:action=>"index", :controller=>"devise/registrations"}

need help.

Emmanuel Abia

unread,
Jan 20, 2016, 11:44:52 AM1/20/16
to rubyonra...@googlegroups.com

Read the configuration procedure again

> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/65a57f1a-871a-4743-a43d-56b0409b902a%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

jai kumar

unread,
Jan 20, 2016, 11:54:39 AM1/20/16
to Ruby on Rails: Talk
my devise working once i remove home link from application.html..

Walter Lee Davis

unread,
Jan 21, 2016, 9:19:53 AM1/21/16
to rubyonra...@googlegroups.com

> On Jan 20, 2016, at 11:54 AM, jai kumar <jai...@gmail.com> wrote:
>
> my devise working once i remove home link from application.html..
>
> On Wednesday, 20 January 2016 22:14:52 UTC+5:30, mode-x wrote:
> Read the configuration procedure again
>
> On 20 Jan 2016 5:25 pm, "jai kumar" <jai...@gmail.com> wrote:
> >
> > No route matches {:action=>"index", :controller=>"devise/registrations"}
> >
> >
> > my application.html.erb
> >
> >
> > <div class ="link1">
> > <%= link_to "Home",:action => 'home' >

That's your problem -- illegal route. Maybe you want link_to( "Home", :root ) instead.

If you haven't read Routing from the Outside In lately, now is a perfect time to do so. http://guides.rubyonrails.org/routing.html

Walter

> > </div>
> > <div class ="link1">
> > <% if userprof_signed_in? %>
> > <%= link_to "Logout", destroy_userprof_session_path, method: :delete, :class => 'navbar-link' %>
> > <% else %>
> > <%= link_to "Sign up", new_userprof_registration_path, :class => 'navbar-link' %> |
> > <%= link_to "Login", new_userprof_session_path, :class => 'navbar-link' %>
> > <% end %>
> >
> >
> > i am able to see home and sign up link but when i am clicking on sign up link i am getting error:No route matches {:action=>"index", :controller=>"devise/registrations"}
> >
> >
> > need help.
> >
> > --
> > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> > To post to this group, send email to rubyonra...@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/65a57f1a-871a-4743-a43d-56b0409b902a%40googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c22b5bce-a7d6-4903-86cb-9a924837930d%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages