Does anyone have a nifty solution for calling stylesheets in a subfolder of the /public/stylesheets folder? Right now, I''m trying to do this: /public /stylesheets /theme1 style.css banner.jpg /theme2 style.css banner.jpg And of course, stylesheet_link doesn''t support subfolders... is there an easy way to do this? I looked at typo but I really don''t want to implement a controller-based solution to do something simple like this. I thought maybe <%= stylesheet_link_tag "theme1/style", :media => "screen" %> would work, but no luck with that because it just does /theme1/style.css instead of /stylesheets/theme1/style.css I''d appreciate some help on this... thanks in advance. -----Original Message----- From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Patrick McCafferty Sent: Friday, October 14, 2005 3:08 PM To: carl-MJzSGySFh6ZUfOvSQQQpYw@public.gmane.org; rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails] Re: validates_confirmation_of not working I think you''re right on this one. I was surprised by validates_associated not validating if it''s nil, but that turns out to be useful. This quirk seems unnecessary, really. On 10/15/05, Carl Youngblood <carl.youngblood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > wrote: Well, if :password does not equal :password_confirmation or if :password_confirmation is not present, it seems to me that validates_confirmation_of should fail. That makes sense according to the logic of what that validation code is supposed to do--make sure that a matching confirmation has been provided for a given attribute. It doesn''t seem like someone should have to add another validation to make sure the first one works. I might be wrong here but it seems like there is a lot more surprise in your expected behavior than mine. Anyone else have any thoughts on this? Thanks, Carl On 10/14/05, Clint Pidlubny <clint-DOvxo+vduAZWk0Htik3J/w@public.gmane.org> wrote: > Should that "bug" be caught with validates_presence_of > :password_confirmation? > > Carl Youngblood wrote: > > >Hi, I think I figured this out. It seems like a bug to me, but when > >user.password_confirmation is nil the validation silently succeeds. > >If it is a String that is different from user.password it seems to > >work. _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
I figured out a solution but I don''t like it... I''ll probably make this into my own helper... <%= stylesheet_link_tag @request.relative_url_root.to_s + "/stylesheets/" + "theme1" + "/style.css" %> -----Original Message----- From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Hogan, Brian P. Sent: Friday, October 14, 2005 3:21 PM To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [Rails] stylesheets and subfolders Does anyone have a nifty solution for calling stylesheets in a subfolder of the /public/stylesheets folder? Right now, I''m trying to do this: /public /stylesheets /theme1 style.css banner.jpg /theme2 style.css banner.jpg And of course, stylesheet_link doesn''t support subfolders... is there an easy way to do this? I looked at typo but I really don''t want to implement a controller-based solution to do something simple like this. I thought maybe <%= stylesheet_link_tag "theme1/style", :media => "screen" %> would work, but no luck with that because it just does /theme1/style.css instead of /stylesheets/theme1/style.css I''d appreciate some help on this... thanks in advance. -----Original Message----- From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Patrick McCafferty Sent: Friday, October 14, 2005 3:08 PM To: carl-MJzSGySFh6ZUfOvSQQQpYw@public.gmane.org; rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails] Re: validates_confirmation_of not working I think you''re right on this one. I was surprised by validates_associated not validating if it''s nil, but that turns out to be useful. This quirk seems unnecessary, really. On 10/15/05, Carl Youngblood <carl.youngblood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > wrote: Well, if :password does not equal :password_confirmation or if :password_confirmation is not present, it seems to me that validates_confirmation_of should fail. That makes sense according to the logic of what that validation code is supposed to do--make sure that a matching confirmation has been provided for a given attribute. It doesn''t seem like someone should have to add another validation to make sure the first one works. I might be wrong here but it seems like there is a lot more surprise in your expected behavior than mine. Anyone else have any thoughts on this? Thanks, Carl On 10/14/05, Clint Pidlubny <clint-DOvxo+vduAZWk0Htik3J/w@public.gmane.org> wrote: > Should that "bug" be caught with validates_presence_of > :password_confirmation? > > Carl Youngblood wrote: > > >Hi, I think I figured this out. It seems like a bug to me, but when > >user.password_confirmation is nil the validation silently succeeds. > >If it is a String that is different from user.password it seems to > >work. _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
override stylesheet_link_tag in app/helpers/application_helper.rb and then you won''t have to duplicate that (necessary) ugliness elsewhere. -- -- Tom Mornini On Oct 14, 2005, at 1:50 PM, Hogan, Brian P. wrote:> I figured out a solution but I don''t like it... I''ll probably make > this into my own helper... > > > <%= stylesheet_link_tag @request.relative_url_root.to_s + "/ > stylesheets/" + "theme1" + "/style.css" %> > > -----Original Message----- > From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails- > bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Hogan, Brian P. > Sent: Friday, October 14, 2005 3:21 PM > To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: [Rails] stylesheets and subfolders > > Does anyone have a nifty solution for calling stylesheets in a > subfolder of the /public/stylesheets folder? > > Right now, I''m trying to do this: > > /public > /stylesheets > /theme1 > style.css > banner.jpg > /theme2 > style.css > banner.jpg > > > And of course, stylesheet_link doesn''t support subfolders... is > there an easy way to do this? I looked at typo but I really don''t > want to implement a controller-based solution to do something > simple like this. > > I thought maybe > > <%= stylesheet_link_tag "theme1/style", :media => "screen" %> > > would work, but no luck with that because it just does > > /theme1/style.css > > instead of > > /stylesheets/theme1/style.css > > I''d appreciate some help on this... thanks in advance. > > > > > > > -----Original Message----- > From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails- > bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Patrick McCafferty > Sent: Friday, October 14, 2005 3:08 PM > To: carl-MJzSGySFh6ZUfOvSQQQpYw@public.gmane.org; rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails] Re: validates_confirmation_of not working > > I think you''re right on this one. I was surprised by > validates_associated not validating if it''s nil, but that turns out > to be useful. This quirk seems unnecessary, really. > > On 10/15/05, Carl Youngblood <carl.youngblood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > wrote: > Well, if :password does not equal :password_confirmation or if > :password_confirmation is not present, it seems to me that > validates_confirmation_of should fail. That makes sense according to > the logic of what that validation code is supposed to do--make sure > that a matching confirmation has been provided for a given attribute. > It doesn''t seem like someone should have to add another validation to > make sure the first one works. > > I might be wrong here but it seems like there is a lot more surprise > in your expected behavior than mine. Anyone else have any thoughts on > this? > > Thanks, > Carl > > On 10/14/05, Clint Pidlubny <clint-DOvxo+vduAZWk0Htik3J/w@public.gmane.org> wrote: > > Should that "bug" be caught with validates_presence_of > > :password_confirmation? > > > > Carl Youngblood wrote: > > > > >Hi, I think I figured this out. It seems like a bug to me, but > when > > >user.password_confirmation is nil the validation silently succeeds. > > >If it is a String that is different from user.password it seems to > > >work. > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails