Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate erb to haml & clean code #72

Merged
merged 1 commit into from
Aug 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions app/views/layouts/mailer.html.erb

This file was deleted.

8 changes: 8 additions & 0 deletions app/views/layouts/mailer.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
!!!
%html
%head
%meta{:content => "text/html; charset=utf-8", "http-equiv" => "Content-Type"}/
:css
/* Email styles need to be inline */
%body
= yield
1 change: 0 additions & 1 deletion app/views/layouts/mailer.text.erb

This file was deleted.

1 change: 1 addition & 0 deletions app/views/layouts/mailer.text.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
= yield
4 changes: 2 additions & 2 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
namespace :v1, defaults: { format: :json } do
devise_scope :user do
get :status, to: 'api#status'
resources :users, only: [:show]
resource :user, only: [:update] do
resources :users, only: :show
resource :user, only: :update do
get :profile
controller :sessions do
post :facebook, on: :collection
Expand Down
6 changes: 0 additions & 6 deletions spec/requests/api/v1/passwords/create_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
describe 'POST api/v1/users/passwords', type: :request do
let!(:user) { create(:user, password: 'mypass123') }

before :each do
ActionMailer::Base.delivery_method = :test
ActionMailer::Base.perform_deliveries = true
ActionMailer::Base.deliveries = []
end

context 'with valid params' do
let(:params) { { email: user.email } }

Expand Down