Dave Smith wrote:
>
>>> -
>>> Ryan Bigg
>>> Freelancer
>>> http://frozenplague.net
>>
>> Thanks for your help.
>>
>> Ive created a nested route, and now have my messages for the project
>> which is fine. The next problem comes from getting the comments for each
>> message in this index pa
>> -
>> Ryan Bigg
>> Freelancer
>> http://frozenplague.net
>
> Thanks for your help.
>
> Ive created a nested route, and now have my messages for the project
> which is fine. The next problem comes from getting the comments for each
> message in this index page.
>
> I am not quite sure h
Ryan Bigg wrote:
> Woah.
>
> Firstly, why are you calling .collect on project.messages and
> everything? This is unnecessary.
>
> Secondly, if messages is an association for a project it would be
> better if you used nested routes, as explained here:
> http://guides.rails.info/routing_outside_i
Ryan,
If I understood correctly, he already has an index action that shows
truncated messages. He asked for a 2nd page to show the whole content
of all messages.
He would probably be better off using a nested route for only 1 action
(index) and retrieving the rest of the message asynchronously w
Woah.
Firstly, why are you calling .collect on project.messages and
everything? This is unnecessary.
Secondly, if messages is an association for a project it would be
better if you used nested routes, as explained here:
http://guides.rails.info/routing_outside_in.html
. Your controller wou
Sazima wrote:
> 1. Route (config/routes.rb):
>
> map.with_options(:controller => 'messages') do |m|
> m.messages '/messages', :action => 'messages'
> end
>
> 2. Action (app/controllers/messages_controller.rb):
>
> def messages
> # Retrieve messages the same way you did in the ind
1. Route (config/routes.rb):
map.with_options(:controller => 'messages') do |m|
m.messages '/messages', :action => 'messages'
end
2. Action (app/controllers/messages_controller.rb):
def messages
# Retrieve messages the same way you did in the index action
end
3. View (app/view
Sazima wrote:
> If this 2nd page you want will contain only 1 message, then it is the
> standard show action + view... Otherwise you can add a named route and
> use whatever name you want for the action and view. But it can be
> trickier to add comments.
>
> Cheers, Sazima
>
> On Jan 5, 3:05�pm,
If this 2nd page you want will contain only 1 message, then it is the
standard show action + view... Otherwise you can add a named route and
use whatever name you want for the action and view. But it can be
trickier to add comments.
Cheers, Sazima
On Jan 5, 3:05 pm, Dave Smith
wrote:
> Sazima w
Sazima wrote:
> Do you want the second page to contain all the messages or just 1
> message?
>
> Cheers, Sazima
>
> On Jan 5, 8:40�am, Dave Smith
?
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscr
Dave Smith wrote:
> Sazima wrote:
>> Do you want the second page to contain all the messages or just 1
>> message?
>>
>> Cheers, Sazima
>>
>> On Jan 5, 8:40�am, Dave Smith
>
> all the messages for a particular project, and then a section under for
> comments to be made for each message (kind
Sazima wrote:
> Do you want the second page to contain all the messages or just 1
> message?
>
> Cheers, Sazima
>
> On Jan 5, 8:40�am, Dave Smith
all the messages for a particular project, and then a section under for
comments to be made for each message (kind of indented if you know what
i
Do you want the second page to contain all the messages or just 1
message?
Cheers, Sazima
On Jan 5, 8:40 am, Dave Smith
wrote:
> Hi Guys,
>
> The answer to this is probably pretty simple but I have an app which
> holds projects, and have messages for each project.
>
> project has_many messages
Bobnation wrote:
> What did you name the method in your project controller?
>
> On Jan 5, 5:40�am, Dave Smith
Hi,
Im not sure if I am going about this the right way but, ive created a
partial called _message in the project view with the following link;
---
What did you name the method in your project controller?
On Jan 5, 5:40 am, Dave Smith
wrote:
> > In my project view page you can see the messages (but they are truncated
> > to save space). I want to have a "more" link that takes the user to
> > another page which holds all the full project mes
> In my project view page you can see the messages (but they are truncated
> to save space). I want to have a "more" link that takes the user to
> another page which holds all the full project messages.
>
> Do I create a page called messages.html.erb?
>
> I would also like to be able to comment
16 matches
Mail list logo