私はかなり長い間さまざまな方法を検索して試してきましたが、機能したいものの最も基本的な実装を取得できないようです。
単純にホームページのフォームを操作したいのですが、最初にしたいことは非表示にすることです。構文が間違っている理由がわかりません。
私の形-
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
<%= devise_error_messages! %>
<div><%= f.label :first_name %><br />
<%= f.text_field :first_name %></div>
<div><%= f.label :last_name %><br />
<%= f.text_field :last_name %></div>
<div class="second_step"><%= f.label :profile_name %><br />
<%= f.text_field :profile_name %></div>
<div class="second_step"><%= f.label :email %><br />
<%= f.email_field :email %></div>
<div><%= f.label :password %><br />
<%= f.password_field :password %></div>
<div><%= f.label :password_confirmation %><br />
<%= f.password_field :password_confirmation %></div>
<div><%= f.submit "Sign up" %></div>
<% end %>
<%= render "devise/shared/links" %>
assets/javascripts/file_name.js の単純な js
$('.second_step').hide();
私のapplication.js
//= require jquery
//= require jquery-ui
//= require jquery_ujs
//= require jquery.ui.datepicker
//= require justgage
//= require raphael.min
//= require jquery.purr
//= require best_in_place
//= require_tree .
=====
アップデート
コンソールエラー -
Uncaught SyntaxError: Unexpected token ILLEGAL front.js:1
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:3000/assets/rails.j