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

scope of this #2

Closed
philfreo opened this issue Jun 29, 2012 · 12 comments
Closed

scope of this #2

philfreo opened this issue Jun 29, 2012 · 12 comments
Assignees
Labels
Milestone

Comments

@philfreo
Copy link

Seems a little strange to me that in the getter functions this refers to the model's attributes but in setters this refers to the model itself. Does there really need to be this inconsistency? It makes calling a method on the model hard in the getters.

@asciidisco
Copy link
Owner

Good catch.
I´ve came across this issue myself in the past week.
Next version of Mutators will break the current behaviour and changes the scope of the getter
functions to the model itself.

Thx, for reporting.

@asciidisco
Copy link
Owner

Btw.: Will be available at the end of the week or so, I´ll have to do some paid work first ;)

@philfreo
Copy link
Author

philfreo commented Jul 5, 2012

for what it's worth, i wrote this to use instead of your library right now

https://gist.github.com/3056724

@asciidisco
Copy link
Owner

Had a quick look,
there are a couple of good ideas.
Is it okay if i 'steal' some of the lines (mentioning their origin) for a future version of mutators?

@philfreo
Copy link
Author

philfreo commented Jul 5, 2012

of course, that's why i shared :)

@asciidisco
Copy link
Owner

Thank you.
I´ll leave the ticket open, so I won´t forget about it.

@ghost ghost assigned asciidisco Dec 13, 2012
@mohitmayank
Copy link

hi, is there any update on this.

@philfreo
Copy link
Author

@mohitmayank if this plugin's not updated, I suggest checking out that gist -- I've been using it successfully now for a while. probably will make my own plugin out of it at some point if there's not another good one

@philfreo
Copy link
Author

although looks like it may have been fixed here in 57d5f00

@mohitmayank
Copy link

@philfreo thanks for your reply. i had a look at your gist earlier as well. but felt lazy at the time. wishful thinking :). anyways i am using your code now. i have also added a toJSON method to it.
Let me know if you roll a plugin with this. I'll help.
https://gist.github.com/mohitmayank/5038191

@rubiii
Copy link
Collaborator

rubiii commented Apr 29, 2013

@philfreo isn't this fixed with the changeset you linked to?
using v0.3.1, the scope for both setters and getters is the model.

@asciidisco
Copy link
Owner

Changes are in, preparing the next release atm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants