Is there anyway for a component to use the layouts availble to rest of the app, but still use the templates under its own directory? Setting the layout with a "layouts/admin" say, just produces "can not find admin.rhtml...". Is there anyway around this? If not I guess I could just put the views under app/views, but really wanted to keep things seperate. Thanks! -Nick
I try to call up images in my browser from my public/images directory and get a routing error. Here is my path http://localhost:3000/images/logo.jpg And the error Routing Error Recognition failed for "/images/logo.jpg" Any ideas why this would be happening? --- Nick Stuart <nicholas.stuart-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Is there anyway for a component to use the layouts > availble to rest of > the app, but still use the templates under its own > directory? Setting > the layout with a "layouts/admin" say, just produces > "can not find > admin.rhtml...". Is there anyway around this? > > If not I guess I could just put the views under > app/views, but really > wanted to keep things seperate. > > Thanks! > -Nick > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >__________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com
On Thursday 17 November 2005 23:56, Nick Stuart wrote:> Is there anyway for a component to use the layouts availble to rest > of the app, but still use the templates under its own directory? > Setting the layout with a "layouts/admin" say, just produces "can > not find admin.rhtml...". Is there anyway around this? > > If not I guess I could just put the views under app/views, but > really wanted to keep things seperate.Can symlink be an easy way out? Btw, I''ve tried to supply full path to layout method, like "#{RAILS_ROOT}app/views/layouts/blah.rhtml" but with no success. I wonder why so..> Thanks! > -Nick > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-- Dmitry V. Sabanin http://sabanin.ru
On Friday 18 November 2005 00:04, jonathan Mcintire wrote:> I try to call up images in my browser from my > public/images directory and get a routing error. > > Here is my path > > http://localhost:3000/images/logo.jpg > > And the error > > Routing Error > > Recognition failed for "/images/logo.jpg" > > Any ideas why this would be happening?Are you sure logo.jpg is in public/images? And make sure the permissions are correct.> --- Nick Stuart <nicholas.stuart-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Is there anyway for a component to use the layouts > > availble to rest of > > the app, but still use the templates under its own > > directory? Setting > > the layout with a "layouts/admin" say, just produces > > "can not find > > admin.rhtml...". Is there anyway around this? > > > > If not I guess I could just put the views under > > app/views, but really > > wanted to keep things seperate. > > > > Thanks! > > -Nick > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > __________________________________ > Yahoo! FareChase: Search multiple travel sites in one click. > http://farechase.yahoo.com > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-- Dmitry V. Sabanin http://sabanin.ru
Symlinking wont work in this case, its gotta be deployable on a windows box, On 11/17/05, Dmitry V. Sabanin <dmitry-udXvT7TW+8wvJsYlp49lxw@public.gmane.org> wrote:> On Thursday 17 November 2005 23:56, Nick Stuart wrote: > > Is there anyway for a component to use the layouts availble to rest > > of the app, but still use the templates under its own directory? > > Setting the layout with a "layouts/admin" say, just produces "can > > not find admin.rhtml...". Is there anyway around this? > > > > If not I guess I could just put the views under app/views, but > > really wanted to keep things seperate. > Can symlink be an easy way out? > Btw, I''ve tried to supply full path to layout method, like > "#{RAILS_ROOT}app/views/layouts/blah.rhtml" but with no success. I > wonder why so.. > > > Thanks! > > -Nick > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > -- > Dmitry V. Sabanin > http://sabanin.ru > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
I had a similar problem and turned out my path to the image was missing a slash. Example: I had: images/logo.gif and Rails needed /images/logo.gif Not sure if it is the same for you or not, but you can give it a shot. -- Posted via http://www.ruby-forum.com/.
Not quite. All the stuff under /public is working fine and as it should. My problem is that if I have views under /components/my_component/comp/index.rhtml It can''t access a layout under /app/views/layouts/admin.rhtml For now I''ve moved the views of the components under app/views but this kind of defeats the purpose in my mind. Any other ideas on this? -Nick On 11/17/05, Michael <codeslush-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> I had a similar problem and turned out my path to the image was missing > a slash. > > Example: > > I had: > > images/logo.gif > > and Rails needed > > /images/logo.gif > > Not sure if it is the same for you or not, but you can give it a shot. > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Hi Nick, On 11/18/05, Nick Stuart <nicholas.stuart-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Not quite. All the stuff under /public is working fine and as it > should. My problem is that if I have views under > /components/my_component/comp/index.rhtml > It can''t access a layout under /app/views/layouts/admin.rhtml > > For now I''ve moved the views of the components under app/views but > this kind of defeats the purpose in my mind. > > Any other ideas on this?I am using Subversion and I have solved this problem by using "svn:external" property to link components/layouts to /app/views/layouts. Not very beautiful solution but works on Windows. Best regards, Luben _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Interesting idea Luben. This might be the route I go, but it looks like there is no ''offical'' way to handle this. Guess I''ll have open up an enhancement request then... Thanks again! -Nick On 11/18/05, Luben Manolov <luben.manolov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi Nick, > > On 11/18/05, Nick Stuart <nicholas.stuart-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Not quite. All the stuff under /public is working fine and as it > > should. My problem is that if I have views under > > /components/my_component/comp/index.rhtml > > It can''t access a layout under /app/views/layouts/admin.rhtml > > > > For now I''ve moved the views of the components under app/views but > > this kind of defeats the purpose in my mind. > > > > Any other ideas on this? > > I am using Subversion and I have solved this problem by using > "svn:external" property to link components/layouts to /app/views/layouts. > Not very beautiful solution but works on Windows. > > Best regards, > > Luben > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >