As long as the name of the view and the method match it should work.
There is nothing special about the default methods in this respect.
Post a bit more code that exhibits the problem.  Presumably the view
is called views/test/foo.html.erb.  Unless there is something special
about a controller called 'test' that is.

Colin

2009/5/31 zambezi <[email protected]>:
>
> I'm a bit flummoxed by something and hoping someone can offer an
> explanation.
>
> If I create a controller (test) with a RESTfully named method and a
> view (.../test/index), the value of the instance variable passes to
> the view.
>
> class TestController < ApplicationController
>    def index
>       �...@variable = 'Pass to a view'
>    end
> end
> -------------
>
> If I rename the view to (.../test/foo) or some other non-RESTful name
> and appropriately alter the controller method, the value of the
> instance variable does not pass.
>
> class TestController < ApplicationController
>    def foo
>       �...@variable = 'Pass to a view'
>    end
> end
> ---------------
>
> A half dozen inprint and online books seem to dispute my personla
> experience and suggest that the name of the method and view should be
> irrelevant.  So does anybody have a suggestion as to what is going
> on?  Is my routes.rb file where I need to be looking?
>
> Thanks much, Bill
> >
>

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to