User music preferences in bitmask
This commit is contained in:
parent
2f31a6fd65
commit
d50d584bf8
2
Gemfile
2
Gemfile
|
@ -16,6 +16,8 @@ gem 'delayed_job'
|
||||||
gem 'lastfm', :git => 'git://github.com/magnolia-fan/ruby-lastfm.git'
|
gem 'lastfm', :git => 'git://github.com/magnolia-fan/ruby-lastfm.git'
|
||||||
gem 'musicbrainz', '~> 0.4.3'
|
gem 'musicbrainz', '~> 0.4.3'
|
||||||
|
|
||||||
|
gem 'bitmask_attributes'
|
||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
gem 'sqlite3'
|
gem 'sqlite3'
|
||||||
end
|
end
|
||||||
|
|
16
Gemfile.lock
16
Gemfile.lock
|
@ -43,26 +43,28 @@ GEM
|
||||||
awesome_print (0.4.0)
|
awesome_print (0.4.0)
|
||||||
barista (1.2.1)
|
barista (1.2.1)
|
||||||
coffee-script (~> 2.2)
|
coffee-script (~> 2.2)
|
||||||
bcrypt-ruby (3.0.0)
|
bcrypt-ruby (3.0.1)
|
||||||
|
bitmask_attributes (0.2.2)
|
||||||
|
activerecord (~> 3.0)
|
||||||
builder (3.0.0)
|
builder (3.0.0)
|
||||||
coffee-script (2.2.0)
|
coffee-script (2.2.0)
|
||||||
coffee-script-source
|
coffee-script-source
|
||||||
execjs
|
execjs
|
||||||
coffee-script-source (1.1.2)
|
coffee-script-source (1.1.2)
|
||||||
crack (0.1.8)
|
|
||||||
daemons (1.1.4)
|
daemons (1.1.4)
|
||||||
delayed_job (2.1.4)
|
delayed_job (2.1.4)
|
||||||
activesupport (~> 3.0)
|
activesupport (~> 3.0)
|
||||||
daemons
|
daemons
|
||||||
erubis (2.7.0)
|
erubis (2.7.0)
|
||||||
execjs (1.2.4)
|
execjs (1.2.6)
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
haml (3.1.3)
|
haml (3.1.3)
|
||||||
hike (1.2.1)
|
hike (1.2.1)
|
||||||
httparty (0.7.8)
|
httparty (0.8.0)
|
||||||
crack (= 0.1.8)
|
multi_json
|
||||||
|
multi_xml
|
||||||
i18n (0.6.0)
|
i18n (0.6.0)
|
||||||
json (1.5.4)
|
json (1.6.0)
|
||||||
libv8 (3.3.10.2)
|
libv8 (3.3.10.2)
|
||||||
mail (2.3.0)
|
mail (2.3.0)
|
||||||
i18n (>= 0.4.0)
|
i18n (>= 0.4.0)
|
||||||
|
@ -70,6 +72,7 @@ GEM
|
||||||
treetop (~> 1.4.8)
|
treetop (~> 1.4.8)
|
||||||
mime-types (1.16)
|
mime-types (1.16)
|
||||||
multi_json (1.0.3)
|
multi_json (1.0.3)
|
||||||
|
multi_xml (0.4.0)
|
||||||
musicbrainz (0.4.3)
|
musicbrainz (0.4.3)
|
||||||
nokogiri
|
nokogiri
|
||||||
nokogiri (1.5.0)
|
nokogiri (1.5.0)
|
||||||
|
@ -126,6 +129,7 @@ PLATFORMS
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
awesome_print
|
awesome_print
|
||||||
barista
|
barista
|
||||||
|
bitmask_attributes
|
||||||
coffee-script
|
coffee-script
|
||||||
delayed_job
|
delayed_job
|
||||||
haml
|
haml
|
||||||
|
|
|
@ -38,6 +38,7 @@ $ ->
|
||||||
$('.dropdown-toggle, .menu').live 'click', ->
|
$('.dropdown-toggle, .menu').live 'click', ->
|
||||||
$(this).parent('li').toggleClass('open')
|
$(this).parent('li').toggleClass('open')
|
||||||
false
|
false
|
||||||
$('.dropdown-toggle li, .menu li').live 'click', ->
|
$('.dropdown-menu li a').live 'click', ->
|
||||||
$(this).parent('li').toggleClass('open')
|
console.log(1)
|
||||||
|
$(this).parent().parent().parent().toggleClass('open')
|
||||||
false
|
false
|
|
@ -1,3 +1,4 @@
|
||||||
class User < ActiveRecord::Base
|
class User < ActiveRecord::Base
|
||||||
|
bitmask :music, :as => [:album, :single, :live, :bootleg]
|
||||||
has_one :session
|
has_one :session
|
||||||
end
|
end
|
||||||
|
|
|
@ -27,13 +27,13 @@
|
||||||
= image_tag "artist_loader.gif"
|
= image_tag "artist_loader.gif"
|
||||||
%ul.nav.secondary-nav
|
%ul.nav.secondary-nav
|
||||||
%li.dropdown
|
%li.dropdown
|
||||||
%a.dropdown-toggle#username{ :href => "#" } %username%
|
%a.dropdown-toggle#username{ :href => "#/" } %username%
|
||||||
%ul.dropdown-menu
|
%ul.dropdown-menu
|
||||||
%li
|
%li
|
||||||
%a#preferences{ :href => "#" }= I18n.t 'global.settings'
|
%a#preferences{ :href => "#/settings/" }= I18n.t 'global.settings'
|
||||||
%li.divider
|
%li.divider
|
||||||
%li
|
%li
|
||||||
%a#logout{ :href => "#" }= I18n.t 'global.logout'
|
%a#logout{ :href => "#/logout/" }= I18n.t 'global.logout'
|
||||||
|
|
||||||
.popover-wrapper
|
.popover-wrapper
|
||||||
.popover.below#autocomplete-container
|
.popover.below#autocomplete-container
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
%h1 Settings
|
%h1= I18n.t 'settings.title'
|
||||||
%ul.tabs#settings-tabs
|
%ul.tabs#settings-tabs
|
||||||
%li.active
|
%li.active
|
||||||
%a{ :href => "#", :'data-tab' => 'account' }= I18n.t 'settings.tab.account'
|
%a{ :href => "#", :'data-tab' => 'account' }= I18n.t 'settings.tab.account'
|
||||||
|
|
|
@ -19,6 +19,7 @@ en:
|
||||||
typo: "Misspelled?"
|
typo: "Misspelled?"
|
||||||
|
|
||||||
settings:
|
settings:
|
||||||
|
title: "Settings"
|
||||||
tab:
|
tab:
|
||||||
account: "Account"
|
account: "Account"
|
||||||
site: "Site"
|
site: "Site"
|
||||||
|
|
|
@ -19,6 +19,7 @@ ru:
|
||||||
typo: "Опечатались?"
|
typo: "Опечатались?"
|
||||||
|
|
||||||
settings:
|
settings:
|
||||||
|
title: "Настройки"
|
||||||
tab:
|
tab:
|
||||||
account: "Аккаунт"
|
account: "Аккаунт"
|
||||||
site: "Сайт"
|
site: "Сайт"
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddMusicToUser < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :users, :music, :integer
|
||||||
|
end
|
||||||
|
end
|
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# It's strongly recommended to check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(:version => 20110914163231) do
|
ActiveRecord::Schema.define(:version => 20110915043009) do
|
||||||
|
|
||||||
create_table "albums", :force => true do |t|
|
create_table "albums", :force => true do |t|
|
||||||
t.string "name"
|
t.string "name"
|
||||||
|
@ -105,6 +105,7 @@ ActiveRecord::Schema.define(:version => 20110914163231) do
|
||||||
t.string "lastfm_key"
|
t.string "lastfm_key"
|
||||||
t.string "lastfm_username"
|
t.string "lastfm_username"
|
||||||
t.string "lang"
|
t.string "lang"
|
||||||
|
t.integer "music"
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue