Skip to content

Instantly share code, notes, and snippets.

View akaHeimdall's full-sized avatar
💭
Contemplating the unknowns of the universe

Saeed Richardson akaHeimdall

💭
Contemplating the unknowns of the universe
View GitHub Profile
// Create an alert
var a = Titanium.UI.createAlertDialog();
a.setTitle('Table View Test')
a.setMessage('row ' + eventObject.row + ' index ' + eventObject.index + ' section ' + eventObject.section + ' rowData ' + eventObject.rowData + ' [eventObject.index].id: ' + rIndex.rosterID);
a.show();
thisID = $(eventObject.row + " id");
/correct formatting for a nested field in the dataArray
Titanium.API.debug('=================== rosterID: ' + dataArray[eventObject.index].rosterID );
class User < ActiveRecord::Base
has_and_belongs_to_many :roles
def role_symbols
(self.roles || []).map {|r| r.name.to_sym}
end
end