Skip to content

Instantly share code, notes, and snippets.

@joliss
Last active December 17, 2015 13:10
Show Gist options
  • Select an option

  • Save joliss/5615156 to your computer and use it in GitHub Desktop.

Select an option

Save joliss/5615156 to your computer and use it in GitHub Desktop.
This is untested.
Em.View.reopen
classNameBindings: ['testingClass']
testingClass: (->
if Em.testing
if testingClass = this.valueBinding?._from?.match(/[\w|\d]+\.[\w|\d]+$/)?[0]
testingClass.replace('context.', '').replace('.', '__')
).property()
@H1D
Copy link
Copy Markdown

H1D commented May 21, 2013

Thx, @joliss! I forgot that classNames is concatenated property =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment