Changeset 870

Show
Ignore:
Timestamp:
02/21/08 19:09:55
Author:
goldoraf
Message:

Bit of work on notifier demo app

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • apps/notifier/app/models/note.php

    r844 r870  
    44{ 
    55    public static $objects; 
     6    public static $relationships = array( 
     7        'sender' => array('assoc_type' => 'belongs_to', 'foreign_key' => 'sender_id', 'class_name' => 'User') 
     8    ); 
     9     
     10    public function serializable_form() 
     11    { 
     12        return parent::serializable_form(array('include' => array('sender'))); 
     13    } 
    614} 
    715 
  • apps/notifier/app/resources/notes_resource.php

    r844 r870  
    1616        return $note; 
    1717    } 
     18     
     19    public function put() 
     20    { 
     21        $note = Note::$objects->get($this->params['id']);    
     22    } 
    1823} 
    1924 
  • apps/notifier/app/resources/public_timeline_resource.php

    r844 r870  
    44{ 
    55    public function get() 
    6     { 
     6    {echo $this->request->raw_post_data(); 
    77        return Note::$objects->limit(20)->order_by('-timestamp'); 
    88    } 
  • apps/notifier/conf/environments/development.php

    r844 r870  
    22 
    33// Show full error reports and disable caching 
    4 $config->action_controller->consider_all_requests_local = false; 
     4$config->action_controller->consider_all_requests_local = true; 
    55$config->action_controller->perform_caching = false; 
    66$config->active_record->log_sql = true;