Skip to content

Commit 10a04ec

Browse files
committed
Generated Profile Controller
1 parent db869b0 commit 10a04ec

12 files changed

Lines changed: 50 additions & 3 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Place all the behaviors and hooks related to the matching controller here.
2+
# All this logic will automatically be available in application.js.
3+
# You can use CoffeeScript in this file: http://coffeescript.org/

app/assets/stylesheets/application.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@
1313
*= require_tree .
1414
*= require_self
1515
*/
16+
.alert {
17+
margin-top: 10px;
18+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Place all the styles related to the profiles controller here.
2+
// They will automatically be included in application.css.
3+
// You can use Sass (SCSS) here: http://sass-lang.com/
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
class ProfilesController < ApplicationController
2+
def show
3+
end
4+
end

app/helpers/application_helper.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
module ApplicationHelper
2-
end
2+
3+
4+
end

app/helpers/profiles_helper.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
module ProfilesHelper
2+
end

app/models/user.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ class User < ActiveRecord::Base
33
# :confirmable, :lockable, :timeoutable and :omniauthable
44
devise :database_authenticatable, :registerable,
55
:recoverable, :rememberable, :trackable, :validatable
6+
7+
68
end

app/views/layouts/application.html.erb

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,19 @@
6969
</div>
7070
</div>
7171
</div>
72-
<p class="notice"><%= notice %></p> <p class="alert"><%= alert %></p>
73-
72+
73+
<% if flash[:notice] %>
74+
<div class="alert alert-success">
75+
<button class="close" data-dismiss="alert">x</button>
76+
<%= flash[:notice] %>
77+
</div>
78+
<% end %>
79+
<% if flash[:alert] %>
80+
<div class="alert alert-error">
81+
<button class="close" data-dismiss="alert">x</button>
82+
<%= flash[:alert] %>
83+
</div>
84+
<% end %>
7485
<div class="container">
7586
<div class="row">
7687
<div class="span9">

app/views/profiles/show.html.erb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<h1>Profiles#show</h1>
2+
<p>Find me in app/views/profiles/show.html.erb</p>

config/routes.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
Rails.application.routes.draw do
2+
get 'profiles/show'
3+
24
devise_for :users
35
resources :statuses
46

0 commit comments

Comments
 (0)