diff --git a/app/views/janitor_trials/edit.html.erb b/app/views/janitor_trials/edit.html.erb deleted file mode 100644 index e69de29bb..000000000 diff --git a/app/views/janitor_trials/index.html.erb b/app/views/janitor_trials/index.html.erb index e69de29bb..e33cd33ae 100644 --- a/app/views/janitor_trials/index.html.erb +++ b/app/views/janitor_trials/index.html.erb @@ -0,0 +1,23 @@ +

Janitor Trials

+ + + + + + + + + + + <% @janitor_trials.each do |janitor_trial| %> + + + + + + <% end %> + +
UserDuration
<%= janitor_trial.user.name %><%= janitor_trial.created_at %> + <%= link_to "Promote", promote_janitor_trial_path(janitor_trial), :remote => true, :method => :put %> + | <%= link_to "Demote", demote_janitor_trial_path(janitor_trial), :remote => true, :method => :put %> +
diff --git a/app/views/janitor_trials/new.html.erb b/app/views/janitor_trials/new.html.erb index e69de29bb..e4e4edf3e 100644 --- a/app/views/janitor_trials/new.html.erb +++ b/app/views/janitor_trials/new.html.erb @@ -0,0 +1,6 @@ +

New Janitor Trial

+ +<%= simple_form_for(@janitor_trial) do |f| %> + <%= f.input :user_id %> + <%= f.button :submit %> +<% end %> diff --git a/db/migrate/20100309211553_create_janitor_trials.rb b/db/migrate/20100309211553_create_janitor_trials.rb index 1a0b83af2..d9ebe4030 100644 --- a/db/migrate/20100309211553_create_janitor_trials.rb +++ b/db/migrate/20100309211553_create_janitor_trials.rb @@ -1,6 +1,7 @@ class CreateJanitorTrials < ActiveRecord::Migration def self.up create_table :janitor_trials do |t| + t.column :creator_id, :integer, :null => false t.column :user_id, :integer, :null => false t.timestamps end