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