Rob Biedenharn-2 wrote:
> 
> 
> On Jan 31, 2010, at 3:50 PM, vihrao wrote:
> 
>>
>> I tried
>> <%= link_to 'Login', login_user_path(user) %>
>> it did not work
>>
>> I tried:
>> <%= link_to 'Login', :controller => 'user', :action => 'login' %>
>> that worked.
>>
>> So I still don't get how the REST Path is defined and can be used?
> 
> What do you have in your config/routes.rb file? That's key to  
> understanding the named routes that you have available.
> 
>   map.connect ':controller/:action/:id'
>   map.connect ':controller/:action/:id.:format'
>   map.root :controller => "home" 
>   map.connect ':action', :controller => "static" 
>   map.login 'Login',  :controller => 'user', :action => 'login' 
> 
> The above route should haveve created default paths that I would like to
> use? If so can you tell me what would they be based on the route entry.
> 
> -Rob
> 
>>
>> Rob Biedenharn-2 wrote:
>>>
>>> On Jan 31, 2010, at 2:40 PM, vihrao wrote:
>>>> I have a user controller with login as action.
>>>> When I access the index.html.erb file via application.layout file. I
>>>> get a
>>>> error on the login link on the index.html.erb page. I think I am
>>>> having
>>>> dfifficulty in setting up path to an action or even understanding
>>>> how to set
>>>> REST path properly. Can someone please help me.
>>>>
>>>> Here is the error on the home page:
>>>> C:/RoR/health/app/views/home/index.html.erb:3: syntax error,
>>>> unexpected
>>>> tIDENTIFIER, expecting ')'
>>>> ...link_to 'Login' login_user_path(user) ).to_s); @output_buffe...
>>>> ...                               ^
>>>> Extracted source (around line #3):
>>>> 1: <h1>Home app/views/home/index.html.erb</h1>
>>>> 2:
>>>> 3: <%= link_to 'Login' login_user_path(user) %>
>>>> ]
>>>
>>>
>>> <%= link_to 'Login', login_user_path(user) %>
>>>                    ^
>>> You're actually missing a comma
>>>
>>> -Rob
>>>
>>> Rob Biedenharn              http://agileconsultingllc.com
>>> r...@agileconsultingllc.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 rubyonrails-talk@googlegroups.com 
>>> .
>>> To unsubscribe from this group, send email to
>>> rubyonrails-talk+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>>
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://old.nabble.com/Action-path---syntax-error%2C-unexpected-tIDENTIFIER%2C-expecting-%27%29%27-tp27395831p27396446.html
>> Sent from the RubyOnRails Users mailing list archive at Nabble.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 rubyonrails- 
>> t...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> rubyonrails-talk+unsubscr...@googlegroups.com 
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/rubyonrails-talk?hl=en 
>> .
>>
> 
> Rob Biedenharn                http://agileconsultingllc.com
> r...@agileconsultingllc.com
> +1 513-295-4739
> Skype:        rob.biedenharn
> 
> 
> -- 
> 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 rubyonrails-t...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Action-path---syntax-error%2C-unexpected-tIDENTIFIER%2C-expecting-%27%29%27-tp27395831p27407824.html
Sent from the RubyOnRails Users mailing list archive at Nabble.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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to