Permalink
Browse files

Add number of patients to countries

  • Loading branch information...
1 parent 07fed8f commit 061d37ca04991c93052bf6ee4ec291609f692846 @ZuevEvgenii committed Oct 26, 2011
@@ -7,6 +7,7 @@
<% end %>
<%= f.input :description %>
<%= f.input :value %>
+ <%= f.input :number_of_patients %>
<% end %>
<%= f.buttons %>
<% end %>
@@ -2,7 +2,7 @@
$('#dialog').removeClass('no_result');
$('#dialog').attr('title', '<%= @country.country_list.name %>');
$("span.ui-dialog-title").text('<%= @country.country_list.name %>');
- $('#dialog').html('<p> Description: <%= @country.description %> </p> <p> Vitiligo: <%= @country.value %> </p>');
+ $('#dialog').html('<p> Description: <%= @country.description %> </p> <p> Vitiligo: <%= @country.value %> </p> <p> Number of patients: <%= @country.number_of_patients %> </p>');
<% else %>
$('#dialog').addClass('no_result');
<% end %>
@@ -0,0 +1,10 @@
+class AddNumberOfPatientsToCountries < ActiveRecord::Migration
+ def self.up
+ add_column :countries, :number_of_patients, :integer
+ end
+
+ def self.down
+ remove_column :countries, :number_of_patients
+ end
+end
+
View
@@ -10,7 +10,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20111026071721) do
+ActiveRecord::Schema.define(:version => 20111026093311) do
create_table "active_admin_comments", :force => true do |t|
t.integer "resource_id", :null => false
@@ -51,6 +51,7 @@
t.datetime "created_at"
t.datetime "updated_at"
t.integer "country_list_id"
+ t.integer "number_of_patients"
end
create_table "country_lists", :force => true do |t|

0 comments on commit 061d37c

Please sign in to comment.