Giter Site home page Giter Site logo

haml-views-generator's Introduction

Haml Views generator

Very simple generator for generating haml views for existing models

Installation

script/plugin install git://github.com/theneubeck/haml-views-generator.git

Usage

Just take a model and generate the views

script/generate haml_views

Example

script/generate haml_views User exists app/models/ exists app/controllers/ exists app/helpers/ exists app/views/users create app/views/users/index.html.haml create app/views/users/show.html.haml create app/views/users/new.html.haml create app/views/users/edit.html.haml create app/views/users/_form.html.haml

Notes

A nice way of using it is to combine with scaffold_generators:

script/generate rspec_scaffold Note exists app/models/ exists app/controllers/ exists app/helpers/ create app/views/notes create spec/controllers/ create spec/models/ create spec/helpers/ create spec/fixtures/ create spec/views/notes create spec/controllers/notes_routing_spec.rb create spec/controllers/notes_controller_spec.rb create app/controllers/notes_controller.rb create spec/helpers/notes_helper_spec.rb create app/helpers/notes_helper.rb create app/views/notes/index.html.erb create app/views/notes/show.html.erb create app/views/notes/new.html.erb create app/views/notes/edit.html.erb create app/models/note.rb create spec/fixtures/notes.yml create spec/models/note_spec.rb create spec/views/notes/edit.html.erb_spec.rb create spec/views/notes/index.html.erb_spec.rb create spec/views/notes/new.html.erb_spec.rb create spec/views/notes/show.html.erb_spec.rb exists db/migrate create db/migrate/20090227091659_create_notes.rb route map.resources :notes rm -rf app/views/notes/* rake db:migrate script/generate haml_views Note

The generator looks up the attributes names from the db, so you’ll need to migrate before using it.

Haml Views generator

A version of the generator that uses the labelled_form_helper from mange

Usage

same as above i.e.

script/generate helped_haml_views

haml-views-generator's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

jgagner

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.