diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 288b9ab..56f94f6 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -13,3 +13,27 @@ *= require_tree . *= require_self */ + +html { + box-sizing: border-box; + font-size: 16px; +} + +*, *:before, *:after { + box-sizing: inherit; +} + +body, h1, h2, h3, h4, h5, h6, p, ol, ul { + margin: 0; + padding: 0; + font-weight: normal; +} + +ol, ul { + list-style: none; +} + +img { + max-width: 100%; + height: auto; +} diff --git a/app/controllers/credentials_controller.rb b/app/controllers/credentials_controller.rb index 700b7ba..fc3f963 100644 --- a/app/controllers/credentials_controller.rb +++ b/app/controllers/credentials_controller.rb @@ -1,6 +1,6 @@ class CredentialsController < ApplicationController before_action :set_credential, only: %i[ show edit update destroy ] - before_action :set_domain, only: %i[ new ] + before_action :set_domain, only: %i[ new create edit update destroy ] # GET /credentials or /credentials.json def index @@ -23,10 +23,11 @@ class CredentialsController < ApplicationController # POST /credentials or /credentials.json def create @credential = Credential.new(credential_params) + @credential.domain_id = @domain.id respond_to do |format| if @credential.save - format.html { redirect_to credential_url(@credential), notice: "Credential was successfully created." } + format.html { redirect_to domain_path(@domain), notice: "Credential was successfully created." } format.json { render :show, status: :created, location: @credential } else format.html { render :new, status: :unprocessable_entity } @@ -39,7 +40,7 @@ class CredentialsController < ApplicationController def update respond_to do |format| if @credential.update(credential_params) - format.html { redirect_to credential_url(@credential), notice: "Credential was successfully updated." } + format.html { redirect_to domain_path(@domain), notice: "Credential was successfully updated." } format.json { render :show, status: :ok, location: @credential } else format.html { render :edit, status: :unprocessable_entity } @@ -53,7 +54,7 @@ class CredentialsController < ApplicationController @credential.destroy respond_to do |format| - format.html { redirect_to credentials_url, notice: "Credential was successfully destroyed." } + format.html { redirect_to domain_path(@domain), notice: "Credential was successfully destroyed." } format.json { head :no_content } end end diff --git a/app/views/credentials/_form.html.erb b/app/views/credentials/_form.html.erb index c06258a..5a9f25d 100644 --- a/app/views/credentials/_form.html.erb +++ b/app/views/credentials/_form.html.erb @@ -12,7 +12,7 @@ <% end %>
<%= notice %>
-<%= notice %>