This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle', | |
coords: ["-26.2041028", "28.0473051"] | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle' | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle' | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In our app, we need to work out user profile completeness when a profile is saved. This is done via a callback. In this callback, we also check for the existance of Paperclip attachments. | |
This should supposedly be done with the following: | |
`@user.document.exists?` | |
That, however, returns false in the callback while a file is being uploaded. It looks like it's stuck in limbo between deleting the old file and saving the new one. A solution to this is to simply use the following: | |
`@user.document?` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
countries = { | |
'AF' => 'Afghanistan', | |
'AX' => 'Aland Islands', | |
'AL' => 'Albania', | |
'DZ' => 'Algeria', | |
'AS' => 'American Samoa', | |
'AD' => 'Andorra', | |
'AO' => 'Angola', | |
'AI' => 'Anguilla', | |
'AQ' => 'Antarctica', |
NewerOlder