diff --git a/.rdebugrc b/.rdebugrc new file mode 100644 index 0000000..16c662b --- /dev/null +++ b/.rdebugrc @@ -0,0 +1,3 @@ +et autolist +set autoeval +set autoreload diff --git a/Gemfile b/Gemfile index cd01435..c3ccbb0 100644 --- a/Gemfile +++ b/Gemfile @@ -12,34 +12,38 @@ gem 'nilify_blanks', '~> 1.0.2' gem 'rails_config', '~> 0.3.3' gem 'rails-settings-cached', '~> 0.3.1' gem 'active-model-email-validator', '~> 1.0.2' -gem 'mail_form', '~> 1.5.0.rc', github: 'plataformatec/mail_form' +gem 'mail_form', '~> 1.5.0' gem 'switch_user', '~> 0.9.3' -gem 'simple_form', '~> 3.0.0.rc', github: 'plataformatec/simple_form' +gem 'simple_form', '~> 3.0.0' gem 'concerned_with', '~> 0.1.0' gem 'navigasmic', '~> 0.5.6', github: 'jejacks0n/navigasmic', tag: 'v0.5.6', ref: '1ffe437f279657c6fb87bb4b0215eb723df4ea7a' gem 'acts_as_nested_interval', '~> 0.1.0' -gem 'seedbank', '~> 0.3.0.pre2', github: 'james2m/seedbank' +gem 'seedbank', '~> 0.3.0' gem 'unicorn', '~> 4.6.3' gem 'sass-rails', '~> 4.0.0' gem 'compass-rails', '~> 2.0.alpha.0' -gem 'bootstrap-sass', github: 'thomas-mcdonald/bootstrap-sass', branch: '3' +gem 'bootstrap-sass', '~> 3.0.2.1' gem 'webshims-rails', '~> 1.11.1' gem 'detect_timezone_rails', '~> 0.0.3' gem 'nprogress-rails', '~> 0.1.2.2' gem 'animate-rails', '~> 1.0.0' gem 'coffee-rails', '~> 4.0.0' -gem 'uglifier', '~> 2.2.1' +gem 'uglifier', '~> 2.3.1' gem 'oily_png', '~> 1.1.0' gem 'therubyracer', '~> 0.12.0' gem 'jquery-rails', '~> 3.0.4' -gem 'jquery-ui-rails', '~> 4.0.4' +gem 'jquery-ui-rails', '~> 4.1.0' gem 'dalli', '~> 2.6.2' gem 'json', '~> 1.8.0' -gem 'active_scaffold', '~> 3.4.0.rc', github: 'activescaffold/active_scaffold' +gem 'active_scaffold', '~> 3.4.0.rc', + github: 'clyfe/active_scaffold', + branch: 'fix-always-use-build_associated' +# path: '/home/clyfe/dev/active_scaffold' +# github: 'activescaffold/active_scaffold' gem 'turbolinks', '~> 1.3.0' gem 'faker','~> 1.2.0' -gem 'factory_girl_rails', '~> 4.2.1' +gem 'factory_girl_rails', '~> 4.3.0' # gem 'rails_admin', '~> 0.5.0' # gem 'jquery-cookie-rails', '~> 1.3.1' # gem 'foreigner', '~> 1.4.2 @@ -49,7 +53,8 @@ group :development do gem 'better_errors', '1.0.1' gem 'binding_of_caller', '0.7.2' gem 'debase', '~> 0.0.7' - gem 'ruby-debug-ide', '~> 0.4.18' + # gem 'byebug', '~> 2.3.1' + # gem 'ruby-debug-ide', '~> 0.4.18' # gem 'mongrel', '>= 1.2.0.pre2' # gem 'capistrano', '~> 2.15.5' # gem 'capistrano-ext', '~> 1.2.1' diff --git a/Gemfile.lock b/Gemfile.lock index b152e43..c5cedf5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -5,18 +5,13 @@ GIT validates_hostname (1.0.0) GIT - remote: git://github.com/activescaffold/active_scaffold.git - revision: 37429d94300c07d5c2b27a0d41d01572c2313236 + remote: git://github.com/clyfe/active_scaffold.git + revision: 5eaedd36fe4ed404049ca02b39a48acb84fbed4f + branch: fix-always-use-build_associated specs: active_scaffold (3.4.0.rc) rails (>= 3.2.6, < 5) -GIT - remote: git://github.com/james2m/seedbank.git - revision: c7a272751336f0d17103028f45b88eac62cbedd7 - specs: - seedbank (0.3.0.pre2) - GIT remote: git://github.com/jejacks0n/navigasmic.git revision: 1ffe437f279657c6fb87bb4b0215eb723df4ea7a @@ -31,30 +26,6 @@ GIT specs: userstamp (2.0.2) -GIT - remote: git://github.com/plataformatec/mail_form.git - revision: 3b15e8c4fb4607556879419db8956965805a0a76 - specs: - mail_form (1.5.0) - actionmailer (>= 3.2, < 5) - activemodel (>= 3.2, < 5) - -GIT - remote: git://github.com/plataformatec/simple_form.git - revision: 146cff7ec6bdaba00201b73704f3417a7b978e31 - specs: - simple_form (3.0.0) - actionpack (>= 4.0.0, < 4.1) - activemodel (>= 4.0.0, < 4.1) - -GIT - remote: git://github.com/thomas-mcdonald/bootstrap-sass.git - revision: 9c6c07f74ff515cf38380b014cfede14a4f0eae4 - branch: 3 - specs: - bootstrap-sass (3.0.0.0) - sass (~> 3.2) - GEM remote: http://rubygems.org/ specs: @@ -97,6 +68,8 @@ GEM erubis (>= 2.6.6) binding_of_caller (0.7.2) debug_inspector (>= 0.0.1) + bootstrap-sass (3.0.2.1) + sass (~> 3.2) builder (3.1.4) cancan (1.6.7) capybara (2.1.0) @@ -129,18 +102,18 @@ GEM debugger-ruby_core_source (1.2.3) detect_timezone_rails (0.0.5) railties (>= 3.1) - devise (3.0.3) + devise (3.0.4) bcrypt-ruby (~> 3.0) orm_adapter (~> 0.1) railties (>= 3.2.6, < 5) warden (~> 1.2.3) - diff-lcs (1.2.4) + diff-lcs (1.2.5) erubis (2.7.0) execjs (2.0.2) - factory_girl (4.2.0) + factory_girl (4.3.0) activesupport (>= 3.0.0) - factory_girl_rails (4.2.1) - factory_girl (~> 4.2.0) + factory_girl_rails (4.3.0) + factory_girl (~> 4.3.0) railties (>= 3.0.0) faker (1.2.0) i18n (~> 0.5) @@ -150,7 +123,7 @@ GEM jquery-rails (3.0.4) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) - jquery-ui-rails (4.0.5) + jquery-ui-rails (4.1.0) railties (>= 3.1.0) json (1.8.1) kgio (2.8.1) @@ -158,11 +131,14 @@ GEM mail (2.5.4) mime-types (~> 1.16) treetop (~> 1.4.8) + mail_form (1.5.0) + actionmailer (>= 3.2, < 5) + activemodel (>= 3.2, < 5) mime-types (1.25) mini_portile (0.5.2) minitest (4.7.5) multi_json (1.8.2) - mysql2 (0.3.13) + mysql2 (0.3.14) nilify_blanks (1.0.2) activerecord (>= 3.0.0) activesupport (>= 3.0.0) @@ -171,7 +147,7 @@ GEM nprogress-rails (0.1.2.3) oily_png (1.1.0) chunky_png (~> 1.2.7) - orm_adapter (0.4.0) + orm_adapter (0.5.0) polyamorous (0.6.4) activerecord (>= 3.0) polyglot (0.3.3) @@ -201,7 +177,7 @@ GEM rake (10.1.0) ref (1.0.5) rspec-core (2.14.7) - rspec-expectations (2.14.3) + rspec-expectations (2.14.4) diff-lcs (>= 1.1.3, < 2.0) rspec-mocks (2.14.4) rspec-rails (2.14.0) @@ -211,15 +187,17 @@ GEM rspec-core (~> 2.14.0) rspec-expectations (~> 2.14.0) rspec-mocks (~> 2.14.0) - ruby-debug-ide (0.4.18) - rake (>= 0.8.1) sass (3.2.12) sass-rails (4.0.1) railties (>= 4.0.0, < 5.0) sass (>= 3.1.10) sprockets-rails (~> 2.0.0) + seedbank (0.3.0) sentient_model (1.0.4) bundler (>= 1.0) + simple_form (3.0.0) + actionpack (>= 4.0.0, < 4.1) + activemodel (>= 4.0.0, < 4.1) sprockets (2.10.0) hike (~> 1.2) multi_json (~> 1.0) @@ -244,19 +222,19 @@ GEM treetop (1.4.15) polyglot polyglot (>= 0.3.1) - turbolinks (1.3.0) + turbolinks (1.3.1) coffee-rails tzinfo (0.3.38) - uglifier (2.2.1) + uglifier (2.3.1) execjs (>= 0.3.0) - multi_json (~> 1.0, >= 1.0.2) + json (>= 1.8.0) unicorn (4.6.3) kgio (~> 2.6) rack raindrops (~> 0.7) warden (1.2.3) rack (>= 1.0) - webshims-rails (1.11.2) + webshims-rails (1.11.3) rails (> 3.1.0) xpath (2.0.0) nokogiri (~> 1.3) @@ -271,7 +249,7 @@ DEPENDENCIES animate-rails (~> 1.0.0) better_errors (= 1.0.1) binding_of_caller (= 0.7.2) - bootstrap-sass! + bootstrap-sass (~> 3.0.2.1) cancan (= 1.6.7) capybara (~> 2.1.0) coffee-rails (~> 4.0.0) @@ -282,12 +260,12 @@ DEPENDENCIES debase (~> 0.0.7) detect_timezone_rails (~> 0.0.3) devise (~> 3.0.3) - factory_girl_rails (~> 4.2.1) + factory_girl_rails (~> 4.3.0) faker (~> 1.2.0) jquery-rails (~> 3.0.4) - jquery-ui-rails (~> 4.0.4) + jquery-ui-rails (~> 4.1.0) json (~> 1.8.0) - mail_form (~> 1.5.0.rc)! + mail_form (~> 1.5.0) mysql2 (~> 0.3.13) navigasmic (~> 0.5.6)! nilify_blanks (~> 1.0.2) @@ -298,16 +276,15 @@ DEPENDENCIES rails-settings-cached (~> 0.3.1) rails_config (~> 0.3.3) rspec-rails (~> 2.14.0) - ruby-debug-ide (~> 0.4.18) sass-rails (~> 4.0.0) - seedbank (~> 0.3.0.pre2)! + seedbank (~> 0.3.0) sentient_model (~> 1.0.4) - simple_form (~> 3.0.0.rc)! + simple_form (~> 3.0.0) squeel (~> 1.1.0) switch_user (~> 0.9.3) therubyracer (~> 0.12.0) turbolinks (~> 1.3.0) - uglifier (~> 2.2.1) + uglifier (~> 2.3.1) unicorn (~> 4.6.3) userstamp (~> 2.0.2)! validates_hostname (~> 1.0.0)! diff --git a/app/models/soa.rb b/app/models/soa.rb index 1722233..3bf7f22 100644 --- a/app/models/soa.rb +++ b/app/models/soa.rb @@ -49,7 +49,7 @@ class SOA < Record # If the serial number is 0, we opt for PowerDNS's automatic serial number # generation, that gets triggered by updating the change_date def update_serial - return if self.content_changed? + return if content_changed? compute_serial end @@ -61,7 +61,7 @@ class SOA < Record # Same as #update_serial and saves the record def update_serial! update_serial - save + save! end # if SOA record's primary NS is among it's domain's NS records diff --git a/app/views/users/domains/_form_association_footer.html.erb b/app/views/users/domains/_form_association_footer.html.erb index d7bac2e..8574a49 100644 --- a/app/views/users/domains/_form_association_footer.html.erb +++ b/app/views/users/domains/_form_association_footer.html.erb @@ -7,13 +7,15 @@ rescue ActiveScaffold::ControllerNotFound end @record = parent_record -show_add_existing = column_show_add_existing(column) -show_add_new = column_show_add_new(column, associated, @record) +show_add_existing = column_show_add_existing(column, parent_record) +show_add_new = column_show_add_new(column, associated, parent_record) return unless show_add_new or show_add_existing -edit_associated_url = params_for(:action => 'edit_associated', :child_association => column.name, :associated_id => '--ID--') if show_add_existing -add_new_url = params_for(:action => 'edit_associated', :child_association => column.name) if show_add_new +temporary_id = generated_id(parent_record) if parent_record.new_record? +controller_path = active_scaffold_controller_for(parent_record.class).controller_path +edit_associated_url = params_for(:controller => controller_path, :action => 'edit_associated', :child_association => column.name, :associated_id => '--ID--', :scope => scope, :id => parent_record.to_param, :generated_id => temporary_id, :parent_controller => controller.controller_path) if show_add_existing +add_new_url = params_for(:controller => controller_path, :action => 'edit_associated', :child_association => column.name, :scope => scope, :id => parent_record.to_param, :generated_id => temporary_id, :parent_controller => controller.controller_path) if show_add_new -%>