This file contains hidden or 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
= form.label :login | |
%br | |
= form.text_field :login | |
%br | |
%br | |
= form.label :email | |
%br | |
= form.text_field :email | |
%br | |
%br |
This file contains hidden or 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
= content_for :content do | |
%h1 Register | |
- form_for @user, :url => account_path do |f| | |
= f.error_messages | |
= render :partial => "form", :object => f | |
= f.submit "Register" |
This file contains hidden or 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
= content_for :content do | |
%p | |
%b Login | |
=h @user.login | |
%p | |
%b Login count | |
=h @user.login_count | |
This file contains hidden or 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
#logo.span-2 | |
%h1 | |
= link_to "Application Name", root_path | |
#login.last.prepend-22 | |
= render :partial => "shared/login" | |
.clear |
This file contains hidden or 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
Logged in: | |
= pluralize User.logged_in.count, "user" | |
%br | |
- if !current_user | |
= link_to "Register", new_account_path | |
| | |
= link_to "Log In", login_path | |
- else | |
= link_to "My Account", account_path | |
| |
This file contains hidden or 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
# metric_fu based code analysis | |
if yes?("Load the Basic Rails template?") | |
run "wget http://gist.github.com/114140.txt" | |
run "mv 114140.txt base_template.rb" | |
load_template "base_template.rb" | |
end | |
if yes?("(Re)Install metric_fu? (with roodi, flay, flog, reek, ...) ") | |
run "sudo gem install jscruggs-metric_fu" |
This file contains hidden or 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
git :init | |
file ".gitignore", <<-END | |
.DS_Store | |
log/*.log | |
tmp/**/* | |
config/database.yml | |
db/*.sqlite3 | |
END |
This file contains hidden or 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
script/generate mailer mailer | |
config/environments/development.rb | |
ActionMailer::Base.delivery_method = :sendmail | |
ActionMailer::Base.sendmail_settings = { | |
:location => '/usr/sbin/sendmail', | |
:arguments => '-i -t' } | |
ActionMailer::Base.perform_deliveries = true | |
ActionMailer::Base.raise_delivery_errors = true | |
ActionMailer::Base.default_charset = "iso-8859-1" |
This file contains hidden or 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
!!! | |
%html{:xmlns => "http://www.w3.org/1999/xhtml", "xml:lang" => "en", :lang => "en"} | |
%head | |
= stylesheet_link_tag 'screen.css', :media => 'screen, projection' | |
= stylesheet_link_tag 'print.css', :media => 'print' | |
/[if IE] | |
= stylesheet_link_tag 'ie.css', :media => 'screen, projection' | |
= stylesheet_link_tag 'application', :media => 'screen, projection' | |
%body | |
.container.showgrid |
This file contains hidden or 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
@import screen.sass | |
-# Theme | |
-# ===================================================== | |
body | |
:background red | |