This file contains hidden or 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
exports.CourseList = function(page_title){ | |
var platform = Ti.Platform.osname; | |
var courseDetail = require('ui/CourseDetailWindow'); | |
var config = require('config/config'); | |
var win = Ti.UI.createWindow({backgroundColor:'#000'}); | |
// create table view data object | |
var params = [ |
This file contains hidden or 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 my controller (following code works fine) | |
def index | |
p User.current.communications.size | |
@msg = Communication.find(:all) | |
@msg.each do |note| | |
p note.user.name | |
end | |
end |
This file contains hidden or 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 my communication.rb file, I have added following code | |
class Communication < ActiveRecord::Base | |
unloadable | |
belongs_to :user | |
User.class_eval do | |
has_many :communications | |
end |
This file contains hidden or 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
// this sets the background color of the master UIView (when there are no windows/tab groups on it) | |
Titanium.UI.setBackgroundColor('#000'); | |
//FACEBOOK CREDENTIAL | |
Titanium.Facebook.appid = "134793934930"; | |
Titanium.Facebook.permissions = ['publish_stream', 'read_stream']; | |
// | |
// create root window |
NewerOlder