Skip to content

Commit

Permalink
undo codeclimate changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Manasa2850 authored May 13, 2020
1 parent 3452d37 commit 01d5e92
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions app/controllers/strategies_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ def new
@viewers = current_user.allies_by_status(:accepted)
@strategy = Strategy.new
@categories = current_user.categories.order('created_at DESC')
@category = Category.new @strategy.build_perform_strategy_reminder
@category = Category.new
@strategy.build_perform_strategy_reminder
end

# GET /strategies/1/edit
Expand All @@ -60,7 +61,8 @@ def edit
# POST /strategies.json
def create
@strategy = Strategy.new(strategy_params.merge(user_id: current_user.id))
@viewers = current_user.allies_by_status(:accepted) @category = Category.new
@viewers = current_user.allies_by_status(:accepted)
@category = Category.new
@strategy.published_at = Time.zone.now if publishing?
shared_create(@strategy)
end
Expand All @@ -84,14 +86,16 @@ def create_task(strategy)
task = Task.find(strategy.id)
if task
task.finished = strategy.finished
task.title = strategy.name task.save
task.title = strategy.name
task.save
end
end

# PATCH/PUT /strategies/1
# PATCH/PUT /strategies/1.json
def update
@viewers = current_user.allies_by_status(:accepted) @category = Category.new
@viewers = current_user.allies_by_status(:accepted)
@category = Category.new
if publishing? && !@strategy.published?
@strategy.published_at = Time.zone.now
elsif saving_as_draft?
Expand Down

0 comments on commit 01d5e92

Please sign in to comment.