ruby on rails - How are instance variables used? -
Say in a controller for comments, I have
def to make @comment = Comment For example, in my questions: How can i get @comment
Controller under the show, I have a form_for link for comment, can I use comment there? Or can I make it for comment on only one page?
It does not make any sense, ask "in what thoughts" there is only one view, which The given view is this app / view / & lt; Admin name & gt; is the default for matching the action name. You can not access it in another view provided by another verb, to set this action provided by the to set @comment for must perform this action.
Comments
Post a Comment