Code Monkey home page Code Monkey logo

rails3_haml_scaffold_generator's Introduction

Information about this fork

This for is no longer following the normal scaffolding layout of Rails. It uses I18n backend for headings, model attributes names etc in it's views.

Rails 3 HAML Scaffold Generator

Essentially just a copy of the Rails 3 ERB generator with HAML replacements for the templates.

Original idea from Paul Barry's article on custom genrators

Installation

  1. Generate your new rails application:

     rails ApplicationName
     cd ApplicationName
    
  2. Edit "Gemfile" and add "gem haml" to the gem list

  3. Either

     gem install haml
    

    ...or...

     bundle install
    
  4. Run

     haml --rails .
    
  5. Edit config/application.rb and add the following:

     config.generators do |g|
         g.template_engine :haml
     end
    
  6. Either

     git clone git://github.com/psynix/rails3_haml_scaffold_generator.git lib/generators/haml
    

    ...or...

     git submodule add git://github.com/psynix/rails3_haml_scaffold_generator.git lib/generators/haml
    
  7. Create stuff with:

     rails generate controller ControllerName index
     rails generate mailer ExamplesNotifications
     rails generate scaffold FancyModel
    

    ... or if you like to mix it up with ERB, ignore step 5 and use ...

     rails generate haml:controller ControllerName index
     rails generate haml:mailer ExamplesNotifications
     rails generate haml:scaffold FancyModel
    

TODO

  • Gemify (?)

rails3_haml_scaffold_generator's People

Contributors

psynix avatar thhermansen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rails3_haml_scaffold_generator's Issues

_form translation

Line 4 shows a hardcoded message for the errorExplanation div's title, this message, contrasting to all other .haml.html file's messages, can't be translated.

_form nesting

Both lines 6 and 7 are wrongly nested, causing the "li" items to come after the "ul".

Superfluous = signs

Fantastic generator in almost every account. I'm just experiencing a small problem where Haml tags are being followed with '=' even though the content of that tag is plain text.

%p
  %strong= Year:
  = @car.year

โ†‘ is being generated, instead of the proper โ†“

%p
  %strong Year:
   = @car.year

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.