search for: barcontroller

Displaying 5 results from an estimated 5 matches for "barcontroller".

2006 Mar 09
4
Stop users accessing methods.
Hello all. Is there a way to stop users from being able to access a controllers methods without affecting the ability of other controllers to use them? i.e FooController def secret #Stuff end end BarController def index redirect_to :controller => ''foo'', action => ''secret'', :id => ''007'' end end But directly accessing the URL server.com/foo/secret/007 would return a "Not found" error? It seems protected and private stop oth...
2007 Aug 04
5
reusable specs - almost there
...because the value of kontroller() is set to whatever it returns the first time it gets called. Here''s the rake output from running the specs shown above: FooController .FooController . Finished in 0.041793 seconds 2 examples, 0 failures I would expect it to print FooController and then BarController ... interestingly, if I insert ''puts kontroller.to_s'' *outside* of the describe block, then it does output the names of both controllers as expected. does anyone know of a solution? thanks dave -- View this message in context: http://www.nabble.com/reusable-specs---almost-the...
2006 May 03
3
One layout for entire App ?
Hi, Being true to DRY, I know in Rails it is possible to define a single layout associated to a controller and all associated views, lists etc.. by the layout name taking on the name of the controller but is it possible of a layout to be shared between many controllers ? TIA, Tuka PS: I accidentally posted this in the Test forum.. so I moved it here to get a pertinent reply -- Posted via
2006 May 04
1
Ways to share code among the ''layout''
Is there a way to use the same code accross multiple layouts. Normally, I am associating a layout with a particular controller? Is there a cleaner way. -- Berlin Brown (ramaza3 on freenode) http://www.newspiritcompany.com http://www.newspiritcompany.com/newforums also checkout alpha version of botverse: http://www.newspiritcompany.com:8086/universe_home
2006 May 07
0
caches_action and render_component
I''ve made some test: ------------------ CODE ------------------ class FooController < ActionController::Base caches_action :foo def foo render_text ''Hello, foo<br />'' end end class BarController < ActionController::Base def bar render :inline => <<-EOS Hello, bar <br /> <%= render_component(:controller => ''foo'', :action => ''foo'', :id => params[:id]) %> EOS end end class FooBarController < Actio...