Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
My Rails application templates
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
less
lib/templates/erb/scaffold
templates
README.md
html5-twitter-bootstrap.rb

README.md

Rails application templates

Aby skorzystać z szablonu html5-twitter-bootstrap.rb wystarczy podać ścieżkę (lub URL) do pliku z szablonem w poleceniu rails new:

rails new ⟨app_name⟩ -m https://raw.github.com/wbzyl/rat/master/html5-twitter-bootstrap.rb --skip-bundle

Now, you can try:

rails g scaffold post title:string body:text published:boolean \
  --skip-stylesheets --skip-test-framework
rake db:migrate
rails c
  Post.create! title: "ala", body: "mam kota", published: true
  Post.create! title: "ola", body: "mam psa", published: true
  quit
rails s

The default look of index and show pages isn’t very pretty, but we can improve it with a small piece of JavaScript added to application.js:

    $(document).ready(function() {
      $('article .attribute')
        .addClass('row').css('margin-bottom', '.25em')
        .find('.name').addClass('span2').css('text-align', 'right')
        .end()
        .find('.value').addClass('span10');
    });

Another solution:

    article {
      &.index {
        margin-bottom: 1em; }
      .attribute {
        .makeRow();
        margin-bottom: .25em;
       .name {
          color: @blueDark;
          .makeColumn(2);
          text-align: right;
          &:after {
            content: ":"; } }
        .value {
          .makeColumn(10); } }
    }

(see, for example Please stop embedding Bootstrap classes in your HTML!)

Info about Bootstrap Mixins:

Create unique design with Bootstrap v2

Prototyping:

  • Placehold – a quick and simple image placeholder service

Less or Sass?

Something went wrong with that request. Please try again.