diff --git a/Gemfile b/Gemfile index 728b05d..2336b43 100644 --- a/Gemfile +++ b/Gemfile @@ -73,6 +73,7 @@ gem 'feedjira' gem 'caracal' # WORD DOC EXPORTING gem 'caracal-rails' +gem 'yaml_db' # ------------------------------------------------ # INTERNATIONALIZATION diff --git a/Gemfile.lock b/Gemfile.lock index 6ef5a6b..9bc58aa 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -203,7 +203,6 @@ ruby-progressbar multi_json (1.12.1) multipart-post (2.0.0) - mysql2 (0.3.21) nokogiri (1.6.8) mini_portile2 (~> 2.1.0) pkg-config (~> 1.1.7) @@ -213,6 +212,7 @@ omniauth-shibboleth (1.2.1) omniauth (>= 1.0.0) orm_adapter (0.5.0) + pg (0.19.0) pkg-config (1.1.7) polyamorous (1.3.1) activerecord (>= 3.0) @@ -221,8 +221,6 @@ pundit (1.1.0) activesupport (>= 3.0.0) rack (1.6.4) - rack-mini-profiler (0.10.1) - rack (>= 1.2.0) rack-test (0.6.3) rack (>= 1.0) rails (4.2.7) @@ -314,6 +312,9 @@ wicked_pdf (1.1.0) xpath (2.0.0) nokogiri (~> 1.3) + yaml_db (0.4.2) + rails (>= 3.0, < 5.1) + rake (>= 0.8.7) yard (0.9.5) PLATFORMS @@ -342,12 +343,11 @@ libv8 minitest-rails-capybara minitest-reporters - mysql2 (~> 0.3.18) omniauth omniauth-shibboleth + pg protected_attributes pundit - rack-mini-profiler rack-test rails (= 4.2.7) railties @@ -364,6 +364,7 @@ uglifier web-console (~> 2.0) wicked_pdf + yaml_db yard RUBY VERSION diff --git a/app/models/organisation.rb b/app/models/organisation.rb index 488debf..7717acd 100644 --- a/app/models/organisation.rb +++ b/app/models/organisation.rb @@ -167,7 +167,7 @@ # # @return [Array] published dmptemplates def published_templates - return dmptemplates.where("published = ?", 1) + return dmptemplates.where("published = ?", true) end def check_api_credentials diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb index bb25316..3ec5f66 100644 --- a/app/views/devise/registrations/edit.html.erb +++ b/app/views/devise/registrations/edit.html.erb @@ -42,7 +42,7 @@ { :class => "typeahead org_sign_up" }) %> <% other_organisations = Array.new %> - <% Organisation.where("parent_id IS ? AND is_other = ?", nil, 1).each do |org| %> + <% Organisation.where("parent_id IS ? AND is_other = ?", nil, true).each do |org| %> <% other_organisations << org.id %> <% end %> "> diff --git a/app/views/shared/_register_form.html.erb b/app/views/shared/_register_form.html.erb index 11100ad..b026327 100644 --- a/app/views/shared/_register_form.html.erb +++ b/app/views/shared/_register_form.html.erb @@ -25,7 +25,7 @@ <% other_organisations = Array.new %> - <% Organisation.where("parent_id IS ? AND is_other = ?", nil, 1).each do |org| %> + <% Organisation.where("parent_id IS ? AND is_other = ?", nil, true).each do |org| %> <% other_organisations << org.id %> <% end %>