Skip to content

Commit

Permalink
merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
paulca committed Aug 19, 2011
2 parents 1a997dd + 5ad3e84 commit 4682605
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Gemfile
@@ -1,8 +1,8 @@
source 'http://rubygems.org'

group :development do
gem 'rake'
gem 'jeweler'
gem 'rake'
gem 'rspec'
gem 'cucumber'
end
10 changes: 7 additions & 3 deletions Gemfile.lock
Expand Up @@ -9,14 +9,16 @@ GEM
json (~> 1.4.6)
term-ansicolor (~> 1.0.5)
diff-lcs (1.1.2)
gemcutter (0.6.1)
gherkin (2.3.3)
json (~> 1.4.6)
git (1.2.5)
jeweler (1.5.2)
bundler (~> 1.0.0)
jeweler (1.4.0)
gemcutter (>= 0.1.0)
git (>= 1.2.5)
rake
rubyforge (>= 2.0.0)
json (1.4.6)
json_pure (1.5.3)
rake (0.8.7)
rspec (2.4.0)
rspec-core (~> 2.4.0)
Expand All @@ -26,6 +28,8 @@ GEM
rspec-expectations (2.4.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.4.0)
rubyforge (2.0.4)
json_pure (>= 1.1.7)
term-ansicolor (1.0.5)

PLATFORMS
Expand Down
5 changes: 4 additions & 1 deletion app/models/configurable.rb
@@ -1,4 +1,5 @@
class Configurable < ActiveRecord::Base

validates_presence_of :name
validates_uniqueness_of :name

Expand All @@ -24,6 +25,8 @@ def self.[]=(key, value)
end

def self.[](key)
return self.defaults[key][:default] unless table_exists?

value = find_by_name(key).try(:value) || self.defaults[key][:default]
case self.defaults[key][:type]
when 'boolean'
Expand Down Expand Up @@ -53,4 +56,4 @@ def self.method_missing(name, *args)
end
end

end
end
7 changes: 3 additions & 4 deletions dummy/Gemfile.lock
@@ -1,10 +1,9 @@
PATH
remote: ../
specs:
configurable_engine (0.2.5)
activerecord (~> 3.0)
builder (~> 2.1.2)
rails (~> 3.0)
configurable_engine (0.2.8)
activerecord (~> 3)
rails (~> 3)

GEM
remote: http://rubygems.org/
Expand Down

0 comments on commit 4682605

Please sign in to comment.