I have some fonts being configured in my Scss file like so: @font-face { font-family: 'Icomoon'; src: asset-url('icoMoon.eot?#iefix', font) format('embedded-opentype'), asset-url('icoMoon.woff', font) format('woff'), asset-url('icoMoon.ttf', font) format('truetype'), asset-url('icoMoon.svg#Icomoon', font) format('svg'); } The actual font file are stored in /app/assets/fonts/ I have added config.as
I am trying to get this form to submit correctly. Here's what I have so far: <% form_for(:user, :url => update_user_setting_path, :remote => true, :html => {:method => :post, :class => "search_form general_form"}) do |f| %> and the button renders with this code: <li><%= link_to raw("<span class='button approve'><span><span>SAVE</span></span></span>"), :action => 'create' %></li> I am using action
I'm trying to submit a form using link_to as follows: <%= form_for(@post, :url=> '/post/action', :method=> 'post', :html => {:id=>'form_id'} ) do |f| %> .... <%= link_to 'submit', "/post/action", :onclick=>"document.getElementById('form_id').submit()" %> .... but it is not posting the form, it is simply redirecting my form to the specified url. Does anyone know how to do this?
In my app a User can create a Business. When they trigger the index action in my BusinessesController I want to check if a Business is related to the current_user.id: If yes: display the business. If no: redirect to the new action. I was trying to use this: if Business.where(:user_id => current_user.id) == nil # no business found end But it always returns true even when the business doesn't exist.
I tend to use before blocks to set instance variables. I then use those variables across my examples. I recently came upon let(). According to RSpec docs, it is used to ... to define a memoized helper method. The value will be cached across multiple calls in the same example but not across examples. How is this different from using instance variables in before blocks? And also when should you use
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く