# Keeping it DRY. Same constant needed in js, sass, and rails

**URL:** <https://www.ruby-forum.com/t/keeping-it-dry-same-constant-needed-in-js-sass-and-rails/185874>\
**Category:** Rails\
**Created:** [March 28, 2010, 6:36am UTC](https://www.ruby-forum.com/t/keeping-it-dry-same-constant-needed-in-js-sass-and-rails/185874 "2010-03-28T06:36:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ralphshnelvar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e19adc/32.png) [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Post date:** [March 28, 2010, 6:36am UTC](https://www.ruby-forum.com/t/keeping-it-dry-same-constant-needed-in-js-sass-and-rails/185874/1 "2010-03-28T06:36:55Z")

</div>

I need a constant, X, to be known in a  
jQuery script  
In an .rb file in Rails  
ins some css/SASS

How can I get this constant known in all three places?
