ruby on rails 4 - The action 'news' could not be found for UsersController -
i doing chapter 7 of michael hartl's rails tutorial , when in section 7.2 want create sign form. users_controller.rb code:
class userscontroller < applicationcontroller def show @user = user.find(params[:id]) end def new @user = user.new end end
and here show.html.erb
<% provide(:title, @user.name) %> <div class="row"> <aside class="col-md-4"> <section class="user_info"> <h1> <%= gravatar_for @user %> <%= @user.name %> </h1> </section> </aside> </div>
@narges understand following michael hartle's book in publications related programming there typo's in text. @ghostgambler said calling 'news' somewhere , method called 'new'. causing error, news not in code anywhere , calling it. find being called , replace 'new' , see error go away , code produce wanted results.
Comments
Post a Comment