<% row.each do |i| %>
<%- if i.nil? -%>
<%= render ‘users/signup’ %>
<%- elsif i.respond_to?(‘category_id’) -%>
<%# render partial_for_post(i.category_id), :object => i %>
<%= i.module %>
<%- end -%>
<% end %>
if I write i.class it returns Post, so I thought module will be a
method in post_controller.rb. But it’s not, can any one tell me, what is
it, and where can I get codes written for i.module.
if I write i.class it returns Post, so I thought module will be a
method in post_controller.rb. But it’s not
If i is of the type Post, i.module will call the method module from the
Post object in app/models/post.rb, not from a PostsController object as
you seem to think it will.
if I write i.class it returns Post, so I thought module will be a
method in post_controller.rb. But it’s not
If i is of the type Post, i.module will call the method module from the
Post object in app/models/post.rb, not from a PostsController object as
you seem to think it will.
Felix
I have checked the code in app/models/post.rb
there are no module method, but at lot of space self.module function has
been called, and a defined method is def set_module