forked from greendog99/greendog-rails-template
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
devise installs cleanly -- don't know if it owrk, bit it installs
- Loading branch information
Philip (flip) Kromer
committed
Jan 3, 2012
1 parent
1aa177f
commit d24867a
Showing
23 changed files
with
176 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,7 +60,6 @@ | |
gem 'awesome_print' | ||
gem 'pry' | ||
end | ||
RUBY | ||
|
||
git :commit => "-am 'Gemfile.'" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
match 'admin/demo' => 'misc#demo' | ||
match 'admin/bootstrap_demo' => 'misc#bootstrap_demo' | ||
RUBY | ||
end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,45 @@ | ||
class User < ActiveRecord::Base | ||
# Include default devise modules. Others available are: | ||
# :token_authenticatable, :confirmable, :lockable and :timeoutable | ||
devise :database_authenticatable, :registerable, | ||
:recoverable, :rememberable, :trackable, :validatable | ||
|
||
# Setup accessible (or protected) attributes for your model | ||
# | ||
# Attributes and scopes | ||
# | ||
attr_accessible :email, :password, :password_confirmation, :remember_me | ||
attr_accessible :name, :username, :is_local | ||
attr_accessible :name, :username, :shibboleth | ||
|
||
# Include default devise modules. Others available are: :token_authenticatable, :confirmable, :lockable and :timeoutable | ||
devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable | ||
|
||
# scopes for arel | ||
scope :alphabetically, order("users.name ASC") | ||
scope :by_id, order("users.id ASC") | ||
|
||
# | ||
# Validations | ||
# | ||
|
||
validates :name, :presence => true, :length => {:minimum => 1, :maximum => 100} | ||
|
||
# require users to know a magic watchword to register. Set this value in | ||
# config/app_config.yaml or use an environment variable -- on heroku, run | ||
# heroku config:add SIGNUP_SHIBBOLETH=your_shibboleth | ||
validates_format_of :shibboleth, :with => /\A#{Settings.signup_shibboleth}\z/, :on => :create, :message => "is wrong - find They Who Hold the Secret and ask them. Also: No Homers" | ||
|
||
# | ||
# Plugins | ||
# | ||
|
||
|
||
# | ||
# Methods | ||
# | ||
|
||
|
||
def titleize | ||
name | ||
end | ||
|
||
def short_name | ||
name.gsub(/^(\w+\W+\w).*/, '\1') | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
- title "Users" | ||
|
||
.right | ||
%p.clear | ||
To set your user image, visit <a href="http://gravatar.com/">gravatar.com</a> | ||
|
||
%hr/ | ||
|
||
%table.users.horizontal | ||
%tr | ||
%th | ||
%th= link_to 'Name', users_path(:order => 'name') | ||
%th Email | ||
- for user in @users | ||
%tr.hcard | ||
%td.photo= image_tag avatar_url(user) | ||
%td.fn.n= link_to_rsrc user | ||
%td.email= user.email | ||
|
||
.buttons | ||
- if user_signed_in? | ||
%p | ||
To create a new user, | ||
= link_to "sign out", destroy_user_session_path | ||
and then go through the signup process | ||
- else | ||
= link_to "New user", new_user_registration_path, :class => :button |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
- title "Lunchlady user #{@user.titleize}" | ||
|
||
%table.vertical.user | ||
%tr | ||
%th Name | ||
%td.td_12= @user.name | ||
%td.td_5.photo{:rowspan => 4 } | ||
= image_tag avatar_url(@user, :s => 200) | ||
%br/ | ||
%span.quiet | ||
Set your image at <a href="http://gravatar.com/">gravatar.com</a> | ||
%tr | ||
%th Email | ||
%td= @user.email | ||
%tr | ||
%td.empty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
get "https://github.com/dotjay/hashgrid/raw/v5/hashgrid.js", "public/javascripts/hashgrid.js" | ||
|
||
inject_into_file 'app/views/layouts/_javascripts.html.haml', :before => %Q{\n\s*= yield :javascripts} do | ||
%Q{= javascript_include_tag('hashgrid') if Rails.env.development?} | ||
end |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.