Skip to content
Browse files

Pre-merge

  • Loading branch information...
1 parent 471194b commit ea6596de60c3d8e1f154665d26d16e1834998061 Jarred Sumner committed Feb 18, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/controllers/companies_controller.rb
View
4 app/controllers/companies_controller.rb
@@ -23,7 +23,7 @@ def create
end
def subscribe
- @email = EmailUpdate.create(:email => params[:email], :company_id => params[:id]) unless Email.find_by_email_and_company_id(params[:email], params[:id])
+ @email = EmailUpdate.create(:email => params[:email], :company_id => params[:id])
respond_to do |format|
format.html { redirect_to '/'}
format.json { render :json => @email }
@@ -34,7 +34,7 @@ def unsubscribe
@email = EmailUpdate.where(:email => params[:email]).each { |email| email.destroy }
respond_to do |format|
format.html { redirect_to '/' }
- format.json { render :json => nil}
+ format.json { render :json => @email }
end
end

0 comments on commit ea6596d

Please sign in to comment.
Something went wrong with that request. Please try again.