我不明白为什么我的收费样式表没有得到适当的选择。 我在charge.css.scss中做的任何样式都不会以任何方式影响我的视图。
application.css
*
*= require jquery.ui.datepicker
*= require_self
*= require bootstrap
*= require front
*= require lists
*= require tasks
*= require lightbox
*/
charges.css.scss
// Place all the styles related to the charges controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
.row_form {
background-color: red;
}
new.html.erb
<div class="container row_form" style="width:990px;">
<div class="row">
<div class="span1 offset3">
<h2></h2>
<%= render '/charges/new' %>
</div>
</div>
</div>
其中_new
是使用stripe.js
只有内联样式工作,它也不会选择任何bootstrap类。我在这里不理解什么?此外,我尝试在清单中包含*= require_tree .
和*= require charges
无效。
使用HTML源更新
<html>
<head>
</head>
<body>
<div class="container row_form" style="width:990px;">
<div class="row">
<div class="span1 offset3">
<h2></h2>
<form accept-charset="UTF-8" action="/charges" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="dvlHeyYvCVfMox/UilOaNoPmT+eO3Z7PuMgE3kXpDPU=" /></div>
<article>
<label class="amount">
<span>Amount: $number</span>
</label>
</article>
<script src="https://checkout.stripe.com/v2/checkout.js" class="stripe-button"
data-key="pk_test_3ZFJmvwy4tgn2XUPwUsL7mZQ"
data-description="Continued Full User Acess"
data-amount="integer">
</script>
</form>
</div>
</div>
</div>
</body>
答案 0 :(得分:0)
检查以下内容
rake assets:clean
并重新启动服务器希望其中一个能让你前进:)