Can a helper load a model? |
[eluser]taewoo[/eluser]
Thanks ucantblamem In /system/application/helper/ajax_rating_helper.php Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); And in /system/application/model/rating_model.php Code: <?php By the way.. i am trying to import this Unobtrusive Ajax rating thing into my site.
[eluser]ejangi[/eluser]
You "getRating()" method in the model is return an array of objects, yet in the helper you're trying to ask for properties of an array (which is impossible as an array is not an object in PHP, hence the error). Try changing getRating() to this: Code: function getRating($id)
[eluser]taewoo[/eluser]
Doh! You're right. How could i've been so el-stupid-o Thanks for your help. I had this issue before but I totally forgot. This is what happens when you're coding 16+ hrs straight. Dammit.
[eluser]wiredesignz[/eluser]
I have done pretty much the same thing, take a look it may help. http://ellislab.com/forums/viewthread/70361/ |
Welcome Guest, Not a member yet? Register Sign In |