アプリケーションに問題があり、student_postulations_path というパスを navbar:S に入れるとクラッシュします。
私は私の中に持っていますroute.rb
resources :students do
resources :postulations
end
私のアプリケーションはこのエラーを言います
No route matches {:controller=>"postulations"}
私の見解
<% elsif student_signed_in? %>
<% menu_group :pull => :right do %>
<%= menu_item "Postulaciones", student_postulations_path %>
<%= menu_divider %>
<%= drop_down current_student.email do %>
<%= menu_item "Logout", destroy_student_session_path, :method => :delete %>
<% end %>
<% end %>
<% else %>
rake ルートを使用する場合:
student_postulations GET /students/:student_id/postulations(.:format) postulations#index
POST /students/:student_id/postulations(.:format) postulations#create
new_student_postulation GET /students/:student_id/postulations/new(.:format) postulations#new
edit_student_postulation GET /students/:student_id/postulations/:id/edit(.:format) postulations#edit
student_postulation GET /students/:student_id/postulations/:id(.:format) postulations#show
PUT /students/:student_id/postulations/:id(.:format) postulations#update
DELETE /students/:student_id/postulations/:id(.:format) postulations#destroy
私のモデルの学生と仮定:
class Student < ActiveRecord::Base
# Include default devise modules. Others available are:
# :token_authenticatable, :confirmable,
# :lockable, :timeoutable and :omniauthable
devise :database_authenticatable,
:recoverable, :rememberable, :trackable, :validatable
# Setup accessible (or protected) attributes for your model
attr_accessible :email, :password, :password_confirmation, :remember_me, :nombre, :rol,
:prioridad, :resumen, :categoria, :foto
# attr_accessible :title, :body
has_many :postulations
end
class Postulation < ActiveRecord::Base
attr_accessible :status, :student_id
belongs_to :student
end
私は自分のエラーを理解していません...私は大丈夫です。助けてください!:)。
感謝