Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

method for create javascript model classes #9

Closed
fntz opened this issue Jan 9, 2015 · 1 comment
Closed

method for create javascript model classes #9

fntz opened this issue Jan 9, 2015 · 1 comment

Comments

@fntz
Copy link
Owner

fntz commented Jan 9, 2015

When we use coffee, we write:

class FooModel exstends Sirius.BaseModel
       @attr: ['id', 'title']
       @validate: ...

But it code dirty for javascript, need some like this

var FooModel = Sirius.BaseModel.define_model({
  'attr': ['id', 'title'],
  'validate' : ...
  some_method: function() {} 
})
@fntz
Copy link
Owner Author

fntz commented Jan 24, 2015

ff9c379

@fntz fntz closed this as completed Jan 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant