Hi, I have been given an exercise to write code for rails like before_filter and after_filter in pure Ruby. And not surprisingly I don''t know how to do that. Please.. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 14 March 2011 13:02, Vipin Nagpal <vipin.itm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, I have been given an exercise to write code for rails like > before_filter and after_filter in pure Ruby. And not surprisingly I > don''t know how to do that. Please..I don''t want to do your homework for you... but your pure Ruby class could inherit from a base class that has "before_filter" and "after_filter" methods, and then does some stuff on initialize and after initialize... Also worth looking at the source code for Rails and seeing how it''s done there - and looking up in your textbooks or the API anything you don''t understand. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Martin Streicher
2011-Mar-14 15:47 UTC
Re: Implementing Rails Like Filters in Rudy Program
Use the source, Luke. On Mar 14, 8:02 am, Vipin Nagpal <vipin....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, I have been given an exercise to write code for rails like > before_filter and after_filter in pure Ruby. And not surprisingly I > don''t know how to do that. Please..-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.