In my assets I have intranet |_1.css.scss |_2.css.scss internet |_1.css.csss application.css application_internet.css application_intranet.css 1.css.scss 2.css.scss 3.css.scss intranet and internet are directories. In my layout I want to exclude the files under internet and intranet. I have created application_internet.css /* * application-internet.css * *= require_self *= require_tree ./internet */ and applicatiion_intranet.css /* * application-intranet.css * *= require_self *= require_tree ./intranet */ to include only the css under the two directories. application.css is: *= require_self *= require colorbox *= require jquery.multiselect *= require superfish *= require_directory . */ What can I do if I want to exclude the files under internet and intranet directories? -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thursday, January 5, 2012, 9:25:03 AM, you wrote: M> In my assets I have M> intranet M> |_1.css.scss M> |_2.css.scss M> internet M> |_1.css.csss M> application.css M> application_internet.css M> application_intranet.css M> 1.css.scss M> 2.css.scss M> 3.css.scss M> intranet and internet are directories. M> In my layout I want to exclude the files under internet and intranet. M> I have created M> application_internet.css M> /* M> * application-internet.css M> * M> *= require_self M> *= require_tree ./internet M> */ M> and applicatiion_intranet.css M> /* M> * application-intranet.css M> * M> *= require_self M> *= require_tree ./intranet M> */ M> to include only the css under the two directories. M> application.css is: M> *= require_self M> *= require colorbox M> *= require jquery.multiselect M> *= require superfish M> *= require_directory . M> */ M> What can I do if I want to exclude the files under internet and M> intranet directories? You might find this video useful: http://railscasts.com/episodes/282-upgrading-to-rails-3-1?autoplay=true Best, ralph -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 5 January 2012 18:24, Ralph Shnelvar <ralphs-bVGy8FV858MAvxtiuMwx3w@public.gmane.org> wrote:> Thursday, January 5, 2012, 9:25:03 AM, you wrote: > > M> In my assets I have > > M> intranet > M> |_1.css.scss > M> |_2.css.scss > M> internet > M> |_1.css.csss > M> application.css > M> application_internet.css > M> application_intranet.css > M> 1.css.scss > M> 2.css.scss > M> 3.css.scss > > M> intranet and internet are directories. > M> In my layout I want to exclude the files under internet and intranet. > M> I have created > M> application_internet.css > > M> /* > M> * application-internet.css > M> * > M> *= require_self > M> *= require_tree ./internet > M> */ > > M> and applicatiion_intranet.css > > M> /* > M> * application-intranet.css > M> * > M> *= require_self > M> *= require_tree ./intranet > M> */ > > M> to include only the css under the two directories. > > M> application.css is: > > M> *= require_self > M> *= require colorbox > M> *= require jquery.multiselect > M> *= require superfish > M> *= require_directory . > M> */ > > > M> What can I do if I want to exclude the files under internet and > M> intranet directories? > > You might find this video useful: http://railscasts.com/episodes/282-upgrading-to-rails-3-1?autoplay=trueI know that video and don''t help me. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Brynjolfur Thorvardsson
2012-Jan-06 07:09 UTC
SV: assest pipeline how to exclude some css files?
Well, the easiest way would be to simply remove the files you don''t want to use? You might also try using a dynamic css, if you rename your application.css to application.css.erb it will still work as before but now you can embed ruby code. If your other css files have a different ending (e.g. .dcss) they won''t be loaded automatically, but you can include them in your application.css.erb file with simple render statements, possibly something like: <%render :file mycss.dcss, :content_type => ''text/css''%> -----Oprindelig meddelelse----- Fra: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-talk@googlegroups.com] På vegne af Mauro Sendt: 6. januar 2012 00:37 Til: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Emne: Re: [Rails] assest pipeline how to exclude some css files? On 5 January 2012 18:24, Ralph Shnelvar <ralphs-bVGy8FV858MAvxtiuMwx3w@public.gmane.org> wrote:> Thursday, January 5, 2012, 9:25:03 AM, you wrote: > > M> In my assets I have > > M> intranet > M> |_1.css.scss > M> |_2.css.scss > M> internet > M> |_1.css.csss > M> application.css > M> application_internet.css > M> application_intranet.css > M> 1.css.scss > M> 2.css.scss > M> 3.css.scss > > M> intranet and internet are directories. > M> In my layout I want to exclude the files under internet and intranet. > M> I have created > M> application_internet.css > > M> /* > M> * application-internet.css > M> * > M> *= require_self > M> *= require_tree ./internet > M> */ > > M> and applicatiion_intranet.css > > M> /* > M> * application-intranet.css > M> * > M> *= require_self > M> *= require_tree ./intranet > M> */ > > M> to include only the css under the two directories. > > M> application.css is: > > M> *= require_self > M> *= require colorbox > M> *= require jquery.multiselect > M> *= require superfish > M> *= require_directory . > M> */ > > > M> What can I do if I want to exclude the files under internet and > M> intranet directories? > > You might find this video useful: > http://railscasts.com/episodes/282-upgrading-to-rails-3-1?autoplay=tru > eI know that video and don''t help me. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 6 January 2012 08:09, Brynjolfur Thorvardsson <binni-6eh5JQIm30aHXe+LvDLADg@public.gmane.org> wrote:> Well, the easiest way would be to simply remove the files you don''t want to use?No, I need them for another layout in the same application.> > You might also try using a dynamic css, if you rename your application.css to application.css.erb it will still work as before but now you can embed ruby code. If your other css files have a different ending (e.g. .dcss) they won''t be loaded automatically, but you can include them in your application.css.erb file with simple render statements, possibly something like: > > <%render :file mycss.dcss, :content_type => ''text/css''%>Well, I didn''t know that, thank you for the useful information. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Brynjolfur Thorvardsson
2012-Jan-06 09:23 UTC
SV: assest pipeline how to exclude some css files?
Hi again - I''ve got a fully dynamic css setup which includes using a css controller. That way you get the option of passing variables to your css from Rails, basically you can enable full programmatic control of your stylesheets. What I''ve got is following: dcss_controller.rb: class DcssController < ApplicationController def dstyle render :file => ''dcss/dstyle.css'', :content_type => ''text/css'' end end routes.rb: ... match ''dcss/dstyle'' => ''dcss#dstyle'' ... /app/views/dcss/dstyle.css.erb This file contains ruby code in <% %> and normal css code. You can render your other stylesheets from here. application.html.erb: ... <%= stylesheet_link_tag dcss_dstyle_url %> ... -----Oprindelig meddelelse----- Fra: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-talk@googlegroups.com] På vegne af Mauro Sendt: 6. januar 2012 09:22 Til: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Emne: Re: [Rails] assest pipeline how to exclude some css files? On 6 January 2012 08:09, Brynjolfur Thorvardsson <binni-6eh5JQIm30aHXe+LvDLADg@public.gmane.org> wrote:> Well, the easiest way would be to simply remove the files you don''t want to use?No, I need them for another layout in the same application.> > You might also try using a dynamic css, if you rename your application.css to application.css.erb it will still work as before but now you can embed ruby code. If your other css files have a different ending (e.g. .dcss) they won''t be loaded automatically, but you can include them in your application.css.erb file with simple render statements, possibly something like: > > <%render :file mycss.dcss, :content_type => ''text/css''%>Well, I didn''t know that, thank you for the useful information. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 6 January 2012 10:23, Brynjolfur Thorvardsson <binni-6eh5JQIm30aHXe+LvDLADg@public.gmane.org> wrote:> Hi again - I''ve got a fully dynamic css setup which includes using a css controller. That way you get the option of passing variables to your css from Rails, basically you can enable full programmatic control of your stylesheets. > > What I''ve got is following: > > dcss_controller.rb: > > class DcssController < ApplicationController > def dstyle > render :file => ''dcss/dstyle.css'', :content_type => ''text/css'' > end > endInteresting solution. I''ve used this approach: http://stackoverflow.com/questions/7134034/using-rails-3-1-assets-pipeline-to-conditionally-use-certain-css -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.