removed robots.txt, changed validator class to validator module, little optical code improvements
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
class Track < ActiveRecord::Base
|
||||
belongs_to :artist
|
||||
has_many :playlists, :through => :playlists_tracks
|
||||
|
||||
end
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
class User < ActiveRecord::Base
|
||||
has_and_belongs_to_many :artists
|
||||
|
||||
# :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable
|
||||
devise :database_authenticatable, :registerable, :omniauthable,
|
||||
:recoverable, :rememberable, :trackable, :validatable
|
||||
|
||||
@@ -20,5 +20,5 @@
|
||||
|
||||
<%- if devise_mapping.omniauthable? %>
|
||||
<%= link_to "Sign in with Facebook", user_omniauth_authorize_path(:facebook) %><br />
|
||||
<%= link_to "Sign in with Google", user_omniauth_authorize_path(:open_id, :openid_url =>'https://www.google.com/accounts/o8/id') %><br />
|
||||
<%= link_to "Sign in with Google", user_omniauth_authorize_path(:open_id, :openid_url => 'https://www.google.com/accounts/o8/id') %><br />
|
||||
<% end -%>
|
||||
@@ -193,7 +193,7 @@ Devise.setup do |config|
|
||||
config.omniauth :facebook, 'APP_ID', 'APP_SECRET'
|
||||
end
|
||||
config.omniauth :open_id, OpenID::Store::Filesystem.new('/tmp')
|
||||
# config.omniauth :open_id, OpenID::Store::Filesystem.new('/tmp'), :name => 'google', :identifier => 'https://www.google.com/accounts/o8/id'
|
||||
# config.omniauth :google_apps, OpenID::Store::Filesystem.new('/tmp'), :name => 'google', :identifier => 'https://www.google.com/accounts/o8/id'
|
||||
# config.omniauth :twitter, 'CONSUMER_KEY', 'CONSUMER_SECRET'
|
||||
|
||||
# ==> Warden configuration
|
||||
|
||||
@@ -6,7 +6,7 @@ class CreateArtists < ActiveRecord::Migration
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
create_table :artists_users do |t|
|
||||
create_table :artists_users, :id => false do |t|
|
||||
t.references :user
|
||||
t.references :artist
|
||||
end
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ ActiveRecord::Schema.define(:version => 20110606000240) do
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "artists_users", :force => true do |t|
|
||||
create_table "artists_users", :id => false, :force => true do |t|
|
||||
t.integer "user_id"
|
||||
t.integer "artist_id"
|
||||
end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module LastFM
|
||||
|
||||
class Validator
|
||||
module Validator
|
||||
|
||||
def self.validate_mash mash, *args
|
||||
args.flatten!
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
|
||||
# WebMatrix 1.0
|
||||
Reference in New Issue
Block a user