Coder Social home page Coder Social logo

nifty-generators's Introduction

= Nifty Generators

A collection of useful Rails generator scripts by Ryan Bates.


== Install

  gem install ryanb-nifty-generators --source=http://gems.github.com

  
== Usage

Once you install the gem, the generators will be available to all Rails
applications on your system. If you run script/generate without any
additional arguments you should see the available generators listed.

To run the generator, go to your rails project directory and call it
using the script/generate or script/destroy command.

  script/generate nifty_scaffold Recipe name:string index new

  
== Included Generators

* nifty_layout: generates generic layout, stylesheet, and helper files.
* nifty_scaffold: generates a controller and optional model/migration.
* nifty_config: generates a config YAML file and loader.

Run the command with the --help option to learn more.

  script/generate nifty_layout --help


== Troubleshooting

*I get "undefined method 'title'" error for nifty_scaffold.*

Try running nifty_layout too, that will generate this helper method. Or
you can just change the templates to whatever approach you prefer for
setting the title.


*Forms don't work for nifty_scaffold.*

Try restarting your development server. Sometimes it doesn't detect the
change in the routing.


*The tests/specs don't work for nifty_scaffold.*

Make sure you have mocha installed and require it in your spec/test helper.

  gem install mocha
  
  # in spec_helper.rb
  config.mock_with :mocha
  
  # in test_helper.rb
  require 'mocha'

Also, make sure you're using edge rails (or 2.1 when released) as some methods require that.


== Development

This project can be found on github at the following URL.

http://github.com/ryanb/nifty-generators/

If you wish the generators behaved differently, please consider
forking the project and modifying to your heart's content.

nifty-generators's People

Contributors

drnic avatar ehutzelman avatar ryanb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.