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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -