loadsys/twitter-bootstrap-helper — pull request #23 by izus (2012-07-12 20:19:39+00:00)
Title: some issues about automagic and model name detection

(first of all, sorry if this does not follow your code or naming conventions, it's just a minor fix and kind of an enhancement proposal, not exactly a pull request)

Actually, in a view, $this->TwitterBootstrap is a different object than $this->Form which causes some loses of CakePHP's auto-magic detections.

In concrete, the error that led me to report this is:
Using:
```php
Form->create('Model');
$this->TwitterBootstrap->input('field');
$this->Form->end('Submit');
```
outputs:
```html
TwitterBootstrap->input( **'Model.**field') ergo _no auto-magic for you! :-(_

A solution I can think of would be to use the _same_ object that creates the form, to create the form elements. It knows the model name: _automagic is back, yay!_ :)

Then, using:
```php
TwitterBootstrap->create_form('Model');
$this->TwitterBootstrap->input('title');
$this->TwitterBootstrap->end_form('Submit');
```
will output:
```html
BootstrapFormHelper::create, which is directly inherited from FormHelper with no overrides.

**Cons**
* Using $this->TwitterBoostrap->create_form will cause, again, the original problem when trying to use $this->Form->input, in a case where you dont want to use the TwitterBootstrapHepler.

The other two commits are just a fix to get the automagic done when using $this->TwitterBootstrap->input('id');

Hope it helps, regards