Skip to content

Instantly share code, notes, and snippets.

@danielvlopes
Created December 15, 2011 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielvlopes/1481909 to your computer and use it in GitHub Desktop.
Save danielvlopes/1481909 to your computer and use it in GitHub Desktop.
diff --git a/app/assets/stylesheets/curriculum.css.scss b/app/assets/stylesheets/curriculum.css.scss
index 7528422..f7e4f35 100644
--- a/app/assets/stylesheets/curriculum.css.scss
+++ b/app/assets/stylesheets/curriculum.css.scss
@@ -2,7 +2,6 @@
*= require bootstrap
*/
-
body#resumes {
font-size: 16px;
font-family: Helvetica, Arial, sans-serif;
@@ -69,5 +68,4 @@ body#resumes {
li { line-height: 24px; margin: 14px 0; }
li span { display: block; text-align: left; }
}
-}
-
+}
\ No newline at end of file
diff --git a/app/controllers/profiles_controller.rb b/app/controllers/profiles_controller.rb
index 39296d1..a7333e7 100644
--- a/app/controllers/profiles_controller.rb
+++ b/app/controllers/profiles_controller.rb
@@ -6,11 +6,6 @@ class ProfilesController < ApplicationController
respond_with @profiles
end
- def show
- @profile = Profile.find(params[:id])
- respond_with @profile
- end
-
def new
@profile = Profile.new
respond_with @profile
diff --git a/app/controllers/resumes_controller.rb b/app/controllers/resumes_controller.rb
index 3afd039..16a529f 100644
--- a/app/controllers/resumes_controller.rb
+++ b/app/controllers/resumes_controller.rb
@@ -2,10 +2,10 @@ class ResumesController < ApplicationController
layout "curriculum"
- def show
- profile = Profile.find(params[:id])
- @resume = ResumePresenter.new(profile)
- end
+ def show
+ profile = Profile.find(params[:id])
+ @resume = ResumePresenter.new(profile)
+ end
end
diff --git a/app/controllers/skills_controller.rb b/app/controllers/skills_controller.rb
index b4c6107..4bab3c2 100644
--- a/app/controllers/skills_controller.rb
+++ b/app/controllers/skills_controller.rb
@@ -8,11 +8,6 @@ class SkillsController < ApplicationController
respond_with @skills
end
- def show
- @skill = Skill.find(params[:id])
- respond_with @skill
- end
-
def new
@skill = Skill.new
respond_with @skill
@@ -31,7 +26,7 @@ class SkillsController < ApplicationController
def update
@skill = Skill.find(params[:id])
flash[:notice] = 'Skill was successfully updated.' if @skill.update_attributes(params[:skill])
- respond_with @skill
+ respond_with @skill, :location => skills_url
end
def destroy
diff --git a/app/views/layouts/curriculum.html.erb b/app/views/layouts/curriculum.html.erb
index 27db6d1..b14cf2a 100644
--- a/app/views/layouts/curriculum.html.erb
+++ b/app/views/layouts/curriculum.html.erb
@@ -6,10 +6,9 @@
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
</head>
-<body>
+<body id="<%= body_css_id %>">
<%= yield %>
</body>
</html>
-
diff --git a/app/views/profiles/show.html.erb b/app/views/profiles/show.html.erb
deleted file mode 100644
index 2cd5aa3..0000000
--- a/app/views/profiles/show.html.erb
+++ /dev/null
@@ -1,36 +0,0 @@
-<%= page_header "Show profile" %>
-
-<p>
- <b>First name:</b>
- <%= @profile.first_name %>
-</p>
-
-<p>
- <b>Last name:</b>
- <%= @profile.last_name %>
-</p>
-
-<p>
- <b>Email:</b>
- <%= @profile.email %>
-</p>
-
-<p>
- <b>Job title:</b>
- <%= @profile.job_title %>
-</p>
-
-<p>
- <b>Phone:</b>
- <%= @profile.phone %>
-</p>
-
-<p>
- <b>Site:</b>
- <%= @profile.site %>
-</p>
-
-
-<%= link_to 'Edit', edit_profile_path(@profile) %> |
-<%= link_to 'Back', profiles_path %>
-
diff --git a/config/routes.rb b/config/routes.rb
index b223159..31e11a9 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,14 +1,11 @@
Resume::Application.routes.draw do
+ scope "/admin" do
+ resources :skills, :except => [:show]
+ resources :employments
+ resources :profiles
+ end
+ resources :resumes
- scope "/admin" do
- resources :skills, :except => [:show]
- resources :employments
- resources :profiles
- end
-
- resources :resumes
-
- root :to => "resumes#show"
- end
-
+ root :to => "profiles#index"
+end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment