Yii Framework Forum: Problem with creation of model - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Problem with creation of model Rate Topic: -----

#1 User is offline   Ishbir 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 16
  • Joined: 04-July 09

Posted 13 January 2010 - 11:47 PM

EDIT: Issue has been solved. Thanks for your help!
0

#2 User is offline   jayrulez 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 348
  • Joined: 29-July 09

Posted 14 January 2010 - 12:24 AM

    public function beforeValidate()
    {
        //if(parent::beforeValidate()) { //?
        $this->ip = Yii::app()->request->userHostAddress;
        return true;
        //}
    }

php:
foreach(array('cat', 'dog', 'cow') as $animal) echo $animal."\n";

python:
[(animal, print(animal)) for animal in ['cat', 'dog', 'cow']]

ruby:
['cat', 'dog', 'cow'].each {|animal| puts animal}


You say Tomato, I say Tomato.
0

#3 User is offline   Ishbir 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 16
  • Joined: 04-July 09

Posted 14 January 2010 - 01:03 AM

Woops.. Forgot to add return true;

Thanks for the help jayrulez!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users