Commit 7e23e0c
Changed files (4)
app
controllers
views
layouts
config
locales
spec
controllers
app/controllers/gyms_controller.rb
@@ -1,4 +1,4 @@
-class GymsController < PublicController
+class GymsController < ApplicationController
def index
@gyms = Gym.latest
end
app/views/layouts/application.html.erb
@@ -60,6 +60,7 @@
</li>
<li class="divider"></li>
<li><a href="#">Main Item 2</a></li>
+ <li><%= link_to t(".gyms"), gyms_path %></li>
<li class="divider"></li>
<li class="has-dropdown">
<a href="#"><%= gravatar_for(current_user, size: 16) %> <%= current_user.username %></a>
config/locales/en.yml
@@ -22,6 +22,7 @@
en:
layouts:
application:
+ gyms: Gyms
loading: "Loading..."
nav:
user:
spec/controllers/gyms_controller_spec.rb
@@ -1,6 +1,12 @@
require 'rails_helper'
describe GymsController do
+ let(:user) { create(:user) }
+
+ before :each do
+ http_login(user)
+ end
+
describe "#index" do
let(:sait) { double }
let(:world_health) { double }