(03-04-2015, 06:57 AM)Avenirer Wrote: Yes... that part is in the works, but I am facing a problem. I already tried to guess the table name from the model name with the help of the method _fetch_table() (if I have User_model, it will guess the table name is users), but when I use that function for finding the fields of the table in the get_fields() method somehow the table name gets the name starting from MY_Model name (if I have a User_model, the table name is guessed to be mies - the plural from My). If you think you could take some time to help me resolve this problem, I would be very happy.
I can't see your full class atm (only partial code in Git?) but do you mean $this->table is using the default value from MY_Model and not the one from your extended model? I had that problem too, not sure why but my construct explore call was doing the same thing. I default to null then only run the explore if it's !== null which fixed it. It shouldn't be doing that so CI must be doing something odd when it instantiates models.
I've fleshed my version out quite a bit, although I now realize I need to use a different deliminator for comment key/val's since validation rules use the same thing haha.
Quote:You should probably change the name and visibility of the $table property.
Meh, personally I don't see the purpose of any of CI's HTML helpers. For the same reason the JS library was deprecated I feel the HTML helpers should be as well. In the rare cases I use a table tag they don't save time since you're using attributes and the methods to use those functions are more verbose then typing it yourself.