Profile paths: ~sickill
parent
35af4cf9e7
commit
51dfa8474f
@ -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/
|
@ -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/
|
@ -0,0 +1,9 @@
|
||||
class UsersController < ApplicationController
|
||||
PER_PAGE = 20
|
||||
|
||||
def show
|
||||
@user = User.find_by_nickname(params[:nickname])
|
||||
@asciicasts =
|
||||
@user.asciicasts.order("created_at DESC").page(params[:page]).per(PER_PAGE)
|
||||
end
|
||||
end
|
@ -0,0 +1,2 @@
|
||||
module UsersHelper
|
||||
end
|
@ -0,0 +1,14 @@
|
||||
<div class="user-info">
|
||||
<p>
|
||||
<%= avatar_img(@user) %> <%= @user.nickname %>
|
||||
</p>
|
||||
<p>
|
||||
<%= @user.asciicasts.count %> asciicasts
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<ul class="asciicasts">
|
||||
<%= render :partial => "asciicasts/preview", :collection => @asciicasts, :as => :asciicast %>
|
||||
</ul>
|
||||
|
||||
<%= paginate @asciicasts %>
|
@ -0,0 +1,5 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe UsersController do
|
||||
|
||||
end
|
@ -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
|
Loading…
Reference in New Issue