I want to create text box but in run time
when I write in the controller for @a="input type ='text' "
and in the view <%=@a%> it display text box in the page when it run
but when I write in the controller for @a="<%=text_field%>"
and in the view <%=@a%> it doesn't display text box in the page when
how can i solve it
There are two problems with that. One, all that's going to do is output
the text "text_field" not call the method. Second, text_field requires
two arguments object_name and method.
So anyway, use the send method to call the text_field method in the view
and pass in whatever args you need.
@a = 'text_field'
<%= send(@a, :object_name, :method) %>
Hope that helps.
unfortunately it didn't work
it display that error undefined method ` text_field '
How about creating a hidden DIV
that include the text box, and make it appears programatically.