I have in my controller>> redirect_to :action => ''edit'', :id => @controllerThis works find when using the site: ''/projects/edit/1'' However, when this code is hit froim a functinoal test, it produces: "/projects/edit/#<Account:0xa74a5ba8>" has anyone else run into this? mark -- Mark Van Holstyn mvette13@gmail.com http://lotswholetime.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
I''m not sure why this happens, but you can fix it by passing id @controller.id instead of @controller On 8/23/06, Mark Van Holstyn <mvette13@gmail.com> wrote:> I have in my controller > >> redirect_to :action => ''edit'', :id => @controller > > This works find when using the site: ''/projects/edit/1'' > > However, when this code is hit froim a functinoal test, it produces: > "/projects/edit/#<Account:0xa74a5ba8>" > > has anyone else run into this? > > mark > > -- > Mark Van Holstyn > mvette13@gmail.com > http://lotswholetime.com > > >-- Kevin Clark http://glu.ttono.us --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
On 24/08/2006, at 4:01 AM, Mark Van Holstyn wrote:> I have in my controller > >> redirect_to :action => ''edit'', :id => @controller > > This works find when using the site: ''/projects/edit/1'' > > However, when this code is hit froim a functinoal test, it > produces: "/projects/edit/#<Account:0xa74a5ba8>"Is @controller a model object? It''s probably not a good idea to name your instance var @controller. Try something else, like @project -- tim --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
> > > Is @controller a model object? It''s probably not a good idea to name > your instance var @controller. Try something else, like @project > >In the real code it is @project, not @controller. mark -- Mark Van Holstyn mvette13@gmail.com http://lotswholetime.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
Mark Van Holstyn wrote:> In the real code it is @project, not @controller.When you show someone a sample of code that is failing, you should always show them *real* code. Doing otherwise merely confuses those that are trying to help. Furthermore, this sounds like a support question. Did you make an effort to ask on the talk mailing list or on irc? Further replies to this thread should probably be made to the rubyonrails-talk list. On your actual issue, does your model descend from AR::B? If not then you must define to_param to return the string url encoding for your model. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---