Guest User

Untitled

a guest
Jul 22nd, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. module ActionView
  2. module Template::Handlers
  3. class ErSass < ERB
  4. def compile(template, local_assigns = {})
  5. erbsrc = "<% __in_erb_template=true %>#{template.source}"
  6. erboutput = self.class.erb_implementation.new(erbsrc, :trim => (self.class.erb_trim_mode == "-")).src
  7. erboutput + ";Sass::Engine.new(@output_buffer.to_s, {:load_paths => ['.', 'app/stylesheets']}).render"
  8. end
  9. end
  10. end
  11. end
  12.  
  13. ActionView::Template.register_template_handler :sass, ActionView::Template::Handlers::ErSass
Add Comment
Please, Sign In to add comment