Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module ActionView
- module Template::Handlers
- class ErSass < ERB
- def compile(template, local_assigns = {})
- erbsrc = "<% __in_erb_template=true %>#{template.source}"
- erboutput = self.class.erb_implementation.new(erbsrc, :trim => (self.class.erb_trim_mode == "-")).src
- erboutput + ";Sass::Engine.new(@output_buffer.to_s, {:load_paths => ['.', 'app/stylesheets']}).render"
- end
- end
- end
- end
- ActionView::Template.register_template_handler :sass, ActionView::Template::Handlers::ErSass
Add Comment
Please, Sign In to add comment