Skip to content

Commit

Permalink
Only load auth.js in login page
Browse files Browse the repository at this point in the history
Move auth.js and sha1.js to lib/assets
  • Loading branch information
wolfmanjm committed Nov 12, 2011
1 parent 6daf48b commit 07da7a3
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -15,3 +15,5 @@ TAGS
ext/*
.rvmrc
gem.list
blog.dump
public/assets
6 changes: 6 additions & 0 deletions app/views/users/login.html.haml
@@ -1,3 +1,9 @@
- content_for :head do
= javascript_include_tag 'auth'
:javascript
$(document).ready(function(){$("#login").focus();});


= form_tag login_path, :method => "post" do
= hidden_field_tag 'nonce', @nonce
%p
Expand Down
2 changes: 1 addition & 1 deletion config/environments/production.rb
Expand Up @@ -44,7 +44,7 @@
# config.action_controller.asset_host = "http://assets.example.com"

# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
# config.assets.precompile += %w( search.js )
config.assets.precompile += %w( auth.js sha1.js )

# Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false
Expand Down
@@ -1,3 +1,5 @@
//= require sha1

$(document).ready(function() {
$('#login_button').click(function() {
var n = $('#nonce').val();
Expand Down
File renamed without changes.

0 comments on commit 07da7a3

Please sign in to comment.