Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7039325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:47:05+00:00 2026-05-28T01:47:05+00:00

Following is _form.html.erb generated during scaffolding. <%= form_for(@post) do |f| %> <% if @post.errors.any?

  • 0

Following is _form.html.erb generated during scaffolding.

<%= form_for(@post) do |f| %>
  <% if @post.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@post.errors.count, "error") %> prohibited this post from being saved:</h2>

      <ul>
      <% @post.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

 <!-- <div class="field">
    <%= f.label :name %><br />
    <%= f.text_field :name %>
  </div>-->
  <div class="field">
    <%= f.label :title %><br />
    <%= f.text_field :title %>
  </div>
  <div class="field">
    <%= f.label :content %><br />
    <%= f.text_area :content %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>

I want to use the same view, but I want to apply style to it. I can see div classes “field” and “action”, but I cannot apply style to it. I tried applying style from assets/stylesheets/posts.css. Neither can I find where css is originally applied to this form.

I am sorry, I am new to rails. Any help is appreciated. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T01:47:05+00:00Added an answer on May 28, 2026 at 1:47 am

    Normally, you should have a css layout file at this path :

    your_app/app/views/layouts/_stylesheets.html.erb
    

    which is called from the main application layout :

    your_app/app/views/layouts/application.html.erb
    

    In that file, you should see the following line :

    <%= render 'layouts/stylesheets' %>
    

    That instruction calls the _stylesheets.html.erb layout file. In that file, you can find all the css imports. Ex :

    <%= stylesheet_link_tag 'styles', :media => 'screen' %>
    

    If you want reach the styles.css file, you can find it here :

    your_app/public/stylesheets
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a following javascript that I call from my _form.html.erb. $.ajax({ type: GET,
Using Rails 3.2.0.rc2 and ruby 1.9.3p0 In app/views/requests/_form.html.erb I have the following code for
I have the following form in my /app/views/password_resets/new.html.erb view <% form_tag password_resets_path do %>
I have a form for creating an album like following: # app/views/albums/new.html.erb <h2>Details of
Given the following HTML form: <form id=myform> Company: <input type=text name=Company value=ACME, INC./> First
When you do the following in an HTML form: <input name=one[] value=foo /> <input
I have the following multi-select box in a HTML form, where user can select
For the following HTML: <form name="myForm"> <label>One<input name="area" type="radio" value="S" /></label> <label>Two<input name="area" type="radio"
Suppose I have the following HTML: <form id=myform> <input type='checkbox' name='foo[]'/> Check 1<br/> <input
I have a simple MVC form with the following elements: <%= Html.TextBox(FechaInicio) %> Which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.