使用者工具

網站工具


computer:web:tool:rails

這是本文件的舊版!


Rails

Route

  • rake routes

Record

Model

  • model.cache_key
  • to_partial_path

View

  • content_tag_for
  • asset_path()
  • <%= image_tag(url, :class => "class") %>
  • <% if current_page?(controller: 'news')%>
  • <% content_for :not_authorized do %>
    <script>
      alert('You are not authorized to do that!')
    </script>
    <% end %>
  • <%= params[:controller] %>
  • <% if request.path.start_with?'/links' %>
  • <%= link_to image_tag('picture'), 'url', :target => '_blank' %>

Form

  • submit_tag "Complete sale", data: { disable_with: "Please wait..." }

Config

Component

元件

Gem

上傳

表單

自動

模版

權限

設定

後台

寄信

教學

Tip

書籍

資源

工具

computer/web/tool/rails.1403337563.txt.gz · 上一次變更: 2014/06/21 07:59 由 wm