I''ve got a very long block of code within the create method in my payments_controller.rb. This code is only called from that method in that controller. But I would like to remove it from the controller itself to a separate file somewhere, so the controller remains lean and easy to read. I''ve tried storing it as a separate module in \lib. I''ve also tried storing it in the \helpers\payments_helper.rb module. The problem with having it as a separate module is it doesn''t share session, flash, params, or any of the private methods already defined in payments_controller.rb. There must be a simpler way than trying to pass these objects back and forth. I''ve started looking into "include" but so far I''m running into similar problems. Isn''t there a simpler way to import a code block directly into a method? Thanks, Shauna -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---