Browse the Ruby on Rails Community.

You are here: Forums Ask a Rails expert "redirect_to" in lib...

Replytotopic

"redirect_to" in lib

Posted in Forums : Ask a Rails expert

 
Th

Authority 25
Posting Rating 0
Sign in to rate this post

I created a ruby class and i placed that inside the lib folder in that rails application.But i want to call “redirect_to” method (in the Action Controller) from a method of that newly created class. Does anybody know how to call that method from the lib directory or else is there any other way to redirect the page from there.

 
Profile

Authority 50
Posting Rating 0
Sign in to rate this post

are you sure you need to create a class not for AR?
in that case i suggest you simply monitor a return value from the lib’s mehtod, and redirect in the calling controller.

Replytotopic

Other Recent Topics

Ask a Rails expert : How to work with ror 2.1.1 using Netbeans IDE 6.1

Ask a Rails expert : json gem error

Ask a Rails expert : Problem with break

Ask a Rails expert : activesupport string first method error

Ask a Rails expert : url_for broken ?

Ask a Rails expert : map.routes.rb pls help

Ask a Rails expert : how to h tag in controller

Ask a Rails expert : Problem with Restful routing and partial form

Ask a Rails expert : will_paginate, search and ajax

Ask a Rails expert : captcha

Formatting Help
  • *bold*       _italics_      
    bq. (quotes)
  • "DSC":http://www.dsc.net
  • * or # (lists)
or cancel