diff --git a/Gemfile b/Gemfile index 7b69078b..1aa3618d 100644 --- a/Gemfile +++ b/Gemfile @@ -21,6 +21,8 @@ gem 'jnunemaker-validatable', '>= 1.8.4' # Required by mm-devise gem 'devise', '>= 1.2' gem 'mm-devise', '>= 1.2' +gem "semantic_menu", :git => "git://github.com/michaek/semantic_menu.git" + # Use unicorn as the web server gem 'unicorn' diff --git a/Gemfile.lock b/Gemfile.lock index aa9fde0d..8a7648d0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,9 @@ +GIT + remote: git://github.com/michaek/semantic_menu.git + revision: 5298f586467cc9a91e85befcca673b8406c8846f + specs: + semantic_menu (0.1.0) + GEM remote: http://rubygems.org/ specs: @@ -197,6 +203,7 @@ DEPENDENCIES rails (= 3.1.0.rc6) rspec-rails sass-rails (~> 3.1.0.rc) + semantic_menu! sqlite3 uglifier unicorn diff --git a/app/assets/javascripts/users.js.coffee b/app/assets/javascripts/users.js.coffee new file mode 100644 index 00000000..76156794 --- /dev/null +++ b/app/assets/javascripts/users.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ diff --git a/app/assets/stylesheets/users.css.scss b/app/assets/stylesheets/users.css.scss new file mode 100644 index 00000000..31a2eacb --- /dev/null +++ b/app/assets/stylesheets/users.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the Users controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb new file mode 100644 index 00000000..3e74dea8 --- /dev/null +++ b/app/controllers/users_controller.rb @@ -0,0 +1,2 @@ +class UsersController < ApplicationController +end diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb new file mode 100644 index 00000000..2310a240 --- /dev/null +++ b/app/helpers/users_helper.rb @@ -0,0 +1,2 @@ +module UsersHelper +end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb deleted file mode 100644 index 6fcc8e60..00000000 --- a/app/views/layouts/application.html.erb +++ /dev/null @@ -1,14 +0,0 @@ - - - - HacketyHackCom - <%= stylesheet_link_tag "application" %> - <%= javascript_include_tag "application" %> - <%= csrf_meta_tags %> - - - -<%= yield %> - - - diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml new file mode 100644 index 00000000..e96860bb --- /dev/null +++ b/app/views/layouts/application.html.haml @@ -0,0 +1,10 @@ +!!! +%html + %head + %title Hackety Hack! + = stylesheet_link_tag "application" + = javascript_include_tag "application" + = csrf_meta_tags + %body + = render "shared/menu/user" + = yield \ No newline at end of file diff --git a/app/views/shared/menu/_user.html.haml b/app/views/shared/menu/_user.html.haml new file mode 100644 index 00000000..0a73210f --- /dev/null +++ b/app/views/shared/menu/_user.html.haml @@ -0,0 +1,6 @@ += semantic_menu do |root| + - if current_user + = current_user.email + - root.add "Log Out", destroy_user_session_path, :method => :delete + - else + - root.add "Log In", new_user_session_path \ No newline at end of file diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb new file mode 100644 index 00000000..142455c9 --- /dev/null +++ b/spec/controllers/users_controller_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe UsersController do + +end diff --git a/spec/helpers/users_helper_spec.rb b/spec/helpers/users_helper_spec.rb new file mode 100644 index 00000000..e65fff91 --- /dev/null +++ b/spec/helpers/users_helper_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +# Specs in this file have access to a helper object that includes +# the UsersHelper. For example: +# +# describe UsersHelper do +# describe "string concat" do +# it "concats two strings with spaces" do +# helper.concat_strings("this","that").should == "this that" +# end +# end +# end +describe UsersHelper do + pending "add some examples to (or delete) #{__FILE__}" +end