On Aug 30, 2011, at 4:32 AM, Alexey Muranov wrote:
> Walter Davis wrote in post #1019090:
>> On Aug 29, 2011, at 2:51 PM, Alexey Muranov wrote:
>>
>>> Thanks, but what about, say rendering xml with a template?
>>
>> Controller, in a respond_to block.
>>
>
> What if this is a big repeating block of code?
I am not sure what you mean here. Are you talking about a template
actually being in your controller? Can you show an example (maybe cut
down) to show what you mean by a big repeating block?
>
>>> Or, a better question, is there an example of a method that should
>>> go
>>> into ApplicationController and not into a specific controller or a
>>> helper?
>>
>> Authentication?
>>
>
> I use SessionsController and SessionsHelper for this.
>
> Is ApplicationController a good place for anything other than
> before_filter's?
Looking at a couple projects I have open, mine are largely empty, with
a single method rescue_from_CanCan::AccessDenied and in one a method
called current_practice_id that just looks up the Devise current_user
and extracts that user's practice id. Not much else going on here in
that file. I'm sure there are other great reasons to use it.
Walter
>
> Alexey.
>
> --
> Posted via http://www.ruby-forum.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+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