Permalink
Browse files

cleaning up the files to resolve issues with dependencies

  • Loading branch information...
1 parent bdd0c07 commit 64480f4994ec1fad39bb847bf50e4c1178556c5d @kgogolek committed Sep 17, 2012
@@ -1,8 +1,9 @@
class LiSetupController < ApplicationController
unloadable
-
+
+
def index
- setup = LatestIssuesSetup.find_by_id(1)
+ setup = LatestIssuesSetup.find_by_id(1)
if setup == nil
setup = LatestIssuesSetup.create(:max_count => LatestIssuesSetup::DEFAULT_COUNT, :side => LatestIssuesSetup::DEFAULT_SIDE)
@@ -11,13 +12,12 @@ def index
end
def change
- setup = LatestIssuesSetup.find_by_id(1)
+ setup = LatestIssuesSetup.find_by_id(1)
setup.max_count = params[:count]
setup.side = params[:side]
if setup.save
flash[:notice] = 'Latest Issues setup saved.'
end
redirect_to "/latest-issues" #:action => 'index'
end
-
end
@@ -0,0 +1,2 @@
+module LiSetupHelper
+end
@@ -1,12 +0,0 @@
-<% if issues.any?%>
- <div class="box">
- <h3>Latest Issues</h3>
- <ul>
- <% for issue in issues %>
- <li>
- <%= link_to h(truncate(issue.subject, :length => 60)), :controller => 'issues', :action => 'show', :id => issue %> (<%= format_date(issue.created_on) %>)
- </li>
- <% end %>
- </ul>
- </div>
-<% end %>
@@ -0,0 +1 @@
+<h2>LiSetupController#change</h2>
@@ -12,3 +12,4 @@
</dl>
<dl><input type="submit" value="Save"/></dl>
<% end %>
+
@@ -1,8 +1,8 @@
class CreateLatestIssuesSetups < ActiveRecord::Migration
def change
create_table :latest_issues_setups do |t|
- t.integer :max_count, :default => 5
- t.string :side, :default => 'left'
+ t.integer :max_count
+ t.string :side
end
end
end
View
@@ -1,6 +1,7 @@
require 'redmine'
require_dependency 'latest_issues/view_hook_listener'
+#require_dependency File.expand_path(File.join(File.dirname(__FILE__), 'app/controllers/li_setup_controller'))
Redmine::Plugin.register :latest_issues do
name 'Latest Issues plugin'
@@ -0,0 +1,8 @@
+require File.dirname(__FILE__) + '/../test_helper'
+
+class LiSetupControllerTest < ActionController::TestCase
+ # Replace this with your real tests.
+ def test_truth
+ assert true
+ end
+end
@@ -0,0 +1,9 @@
+require File.dirname(__FILE__) + '/../test_helper'
+
+class LatestIssuesSetupTest < ActiveSupport::TestCase
+
+ # Replace this with your real tests.
+ def test_truth
+ assert true
+ end
+end

0 comments on commit 64480f4

Please sign in to comment.