On Tue, Mar 23, 2010 at 12:43 PM, Colin Law <clanlaw@googlemail.com> wrote:
> On 23 March 2010 16:31, Robin Ting <civ2boss@gmail.com> wrote:
>> I don't, but I figure there must be a way to just have it in the
>> controllers. Oh well thanks, I'll start another thread.
>
> You don't what? It is best to insert your reply at the appropriate
> point in the comment so that it is easier to follow the thread. If
> you mean that you don't have the .:format in the route where you are
> using some_url.csv then that is the problem.
hmm yeah that's what I meant. Thanks I think I figured it out.
This is the code I will use in the routes.rb file:
map.admin 'admin.:format', :controller => 'user_sessions', :action => 'admin'
> Colin
>
>>
>> On Tue, Mar 23, 2010 at 12:17 PM, Colin Law <clanlaw@googlemail.com> wrote:
>>> On 23 March 2010 16:03, Robin Ting <civ2boss@gmail.com> wrote:
>>>> Yeah thanks for the help!
>>>>
>>>> By the way do you know how I can get the "format.csv { render :csv =>
>>>> @logs }" part to work? I have tested it on an index page and that
>>>> works, but when I try it on this admin page it says it doesn't
>>>> understand the URL. I have set a direct path to the admin page instead
>>>> of the standard "controller/action" path in the routes.rb file, but
>>>> even if i go through the "controller/action" path it still says it
>>>> can't find it. Is it because of that direct path in the routes.rb that
>>>> it's giving me the error?
>>>
>>> Have you got the .:format bit in the route? Otherwise I would suggest
>>> a new thread for this question as routing is not my high point.
>>>
>>> Colin
>>>
>>> --
>>> 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+unsubscribe@googlegroups.com.
>>> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
>>>
>>>
>>
>> --
>> 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+unsubscribe@googlegroups.com.
>> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>>
>
> --
> 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+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment