Devise Sign Up Landing page
<p>I saw a few tutorials about setting up devise for all pages using helper, but I can't achieve the same result, here are my code.</p>

<p>I'm following this tutorial but it's not working: <a href="https://github.com/plataformatec/devise/wiki/How-To:-Display-a-custom-sign_in-form-anywhere-in-your-app" rel="nofollow noreferrer">https://github.com/plataformatec/devise/wiki/How-To:-Display-a-custom-sign_in-form-anywhere-in-your-app</a></p>

<p>I have a controller for my pages(now I only have the landing page)</p>

<p><strong>pages_controller.rb</strong></p>

<pre><code>    class PagesController &lt; ApplicationController


    def landing
    end
end
</code></pre>

<p>and I have a header partial in <code>views/layouts/shareds/_header.html.erb</code> where I am calling the devise sign up/sign in.</p>

<pre><code>&lt;div class="col-md-5"&gt;

                &lt;div class="signup-header wow fadeInUp"&gt;
                    &lt;h3 class="form-title text-center"&gt;GET STARTED&lt;/h3&gt;
                    &lt;%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %&gt;
                          &lt;%= devise_error_messages! %&gt;

                          &lt;div class="field"&gt;
                            &lt;%= f.label :email %&gt;&lt;br /&gt;
                            &lt;%= f.email_field :email, autofocus: true %&gt;
                          &lt;/div&gt;

                          &lt;div class="field"&gt;
                            &lt;%= f.label :password %&gt;
                            &lt;% if @minimum_password_length %&gt;
                            &lt;em&gt;(&lt;%= @minimum_password_length %&gt; characters minimum)&lt;/em&gt;
                            &lt;% end %&gt;&lt;br /&gt;
                            &lt;%= f.password_field :password, autocomplete: "off" %&gt;
                          &lt;/div&gt;

                          &lt;div class="field"&gt;
                            &lt;%= f.label :password_confirmation %&gt;&lt;br /&gt;
                            &lt;%= f.password_field :password_confirmation, autocomplete: "off" %&gt;
                          &lt;/div&gt;

                          &lt;div class="actions"&gt;
                            &lt;%= f.submit "Sign up" %&gt;
                          &lt;/div&gt;
                        &lt;% end %&gt;
                &lt;/div&gt;              

            &lt;/div&gt;
</code></pre>

<p>following the tutorial I did:</p>

<p><strong>application_helper.rb</strong></p>

<pre><code> module ApplicationHelper
    helper_method :resource_name, :resource, :devise_mapping

  def resource_name
    :user
  end

  def resource
    @resource ||= User.new
  end

  def devise_mapping
    @devise_mapping ||= Devise.mappings[:user]
  end
end
</code></pre>

<p><strong>application_controller.rb</strong></p>

<pre><code>class ApplicationController &lt; ActionController::Base
  # Prevent CSRF attacks by raising an exception.
  # For APIs, you may want to use :null_session instead.
  protect_from_forgery with: :exception
  include ApplicationHelper
end
</code></pre>

<p>I keep getting this error: <strong>undefined method `helper_method' for ApplicationHelper:Module</strong></p>

<p><a href="https://i.stack.imgur.com/YI0hD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YI0hD.png" alt="enter image description here"></a></p>