Frederick Cheung wrote:
> On Aug 10, 3:34�pm, Wap Addon <[email protected]>
> wrote:
>> i have cateadd.html.erb file in admins folder and i want call admins
>> controller and define method like this
>>
>> � � � � � �def cateadd
>> � � @pro_categorie = ProCategorie.new
>> � � respond_to do |formate|
>> � � format.html # new.html.erb
>> � � � � � � � �format.xml �{ render :xml => @pro_categorie }
>> � � � � � � �end
>
> You've got a typo here - formate/format
>
> Fred
thanks dear is it ok but when put on @pro_categorie in cateadd.html.erb
is below
<div>
<h3 align="center">Add product category</h3>
<% form_for(@pro_categorie) do |f| %>
<%= f.error_messages %>
<table align="center">
</tr>
<td><lable>Category Name :</lable></td>
<td><%= f.text_field :pcate_name %></td>
</tr>
<tr>
<td><lable>Category Description :</lable></td>
<td><%= f.text_field :pcate_desc %></td>
</tr>
</table>
<%end%>
</div>
i got error
Showing app/views/admins/cateadd.html.erb where line #5 raised:
undefined method `pro_categories_path' for #<ActionView::Base:0x4839358>
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---