Code Monkey home page Code Monkey logo

chrno_form_builder's Introduction

Описание

Расширенный form builder для Rails.

Добавляет следующие возможности:

  • Поддержка шаблонов на основе jQuery.tmpl

Пример:

<%= blueprint "my-template" do %>
  <div id="${id} class="content">${content}</div>
<% end %>
...
<%= require_blueprint "my-template" %>
...
<%= render_blueprints %>
  #=>
    <script id="my-template-blueprint" type="text/x-jquery-tmpl">
      <div id="${id} class="content">${content}</div>
    </script>
  • Простейший вывод ошибок для форм

Пример:

<%= f.errors >
  • Хелпер для конструирования HTML на основе Builder::XmlMarkup (удобно использовать внутри других хелперов)

Пример:

build_html do |b|
   b.div( id: "foo" ) {
     b.span {
        b << "bar"
     }
   }
 end
  • Улучшенная поддержка вложенных форм

Пример:

<div id="fields">
  <%= f.fields_for :nested_attribute do |n| >
    <%= n.text_field :foo %>
    <%= n.link_to_destroy "Delete"
  <% end %>
</div>

<%= f.link_to_create :nested_attribute, "New attribute", placeholder: "#fields"

chrno_form_builder's People

Contributors

ddiachkov avatar

Watchers

Ilya avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.