niftier-generators 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  A collection of (more) useful Rails generator scripts for scaffolding, layout files, authentication, and more.
4
4
 
5
+ <b>NOTE:</b> This is a fork of the awesome "nifty-generators" by Ryan Bates. You can find the original project here: http://github.com/ryanb/nifty-generators
6
+
5
7
  == Install
6
8
 
7
9
  gem install niftier-generators
@@ -12,9 +14,9 @@ A collection of (more) useful Rails generator scripts for scaffolding, layout fi
12
14
 
13
15
  == Usage
14
16
 
15
- 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.
17
+ Once you install the gem, the generators will be available to all Rails applications on your system. If you run 'rails generate' without any additional arguments you should see the available generators listed.
16
18
 
17
- To run the generator, go to your rails project directory and call it using the script/generate or script/destroy command.
19
+ To run the generator, go to your rails project directory and call it using the 'rails generate' or 'rails destroy' command.
18
20
 
19
21
  rails generate niftier:scaffold Recipe name:string index new
20
22
 
@@ -31,12 +33,13 @@ To view the README for each generator, run it with the +help+ option.
31
33
  rails generate niftier:layout --help
32
34
 
33
35
  == Troubleshooting and FAQs
36
+ Find the original nifty-generators FAQ here: http://github.com/ryanb/nifty-generators
34
37
 
35
- <b>What is the difference between niftier_scaffold and built-in scaffold?</b>
38
+ <b>What is the difference between niftier:scaffold and built-in scaffold?</b>
36
39
 
37
- One of the primary differences is that niftier_scaffold allows you to choose which controller actions to generate.
40
+ One of the primary differences is that niftier:scaffold allows you to choose which controller actions to generate.
38
41
 
39
- script/generate niftier_scaffold post name:string index new edit
42
+ rails generate niftier:scaffold post name:string index new edit
40
43
 
41
44
  There are a few changes to the generated code as well, such as no XML format by default.
42
45
 
@@ -54,9 +57,9 @@ Add the attribute to the attr_accessible line in the model.
54
57
 
55
58
  <b>I get "undefined method 'root_url'" error.</b>
56
59
 
57
- Some generators default redirecting to the root_url. Set this in your routes.rb file like this (substituting your controller name).
60
+ Some generators default redirecting to the root_url. Set this in your routes.rb file like this (substituting your controller and action names).
58
61
 
59
- map.root :controller => 'foo'
62
+ root :to => "controller#action"
60
63
 
61
64
 
62
65
  <b>I get a missing database error.</b>
@@ -3,7 +3,7 @@
3
3
  %p== Don't have an account? #{link_to "Sign up!", signup_path}
4
4
 
5
5
  <%- if options[:authlogic] -%>
6
- - form_for @<%= session_singular_name %> do |f|
6
+ = form_for @<%= session_singular_name %> do |f|
7
7
  = f.error_messages
8
8
  %p
9
9
  = f.label :username
@@ -16,7 +16,7 @@
16
16
  %p
17
17
  = f.submit "Log in"
18
18
  <%- else -%>
19
- - form_tag <%= session_plural_name %>_path do
19
+ = form_tag <%= session_plural_name %>_path do
20
20
  %p
21
21
  = label_tag :login, "Username or Email Address"
22
22
  %br
@@ -2,7 +2,7 @@
2
2
 
3
3
  %p== Already have an account? #{link_to "Log in", login_path}.
4
4
 
5
- - form_for @<%= user_singular_name %> do |f|
5
+ = form_for @<%= user_singular_name %> do |f|
6
6
  = f.error_messages
7
7
  %p
8
8
  = f.label :username
@@ -1,4 +1,4 @@
1
- - form_for @<%= singular_name %> do |f|
1
+ = form_for @<%= singular_name %> do |f|
2
2
  = f.error_messages
3
3
  <%- for attribute in model_attributes -%>
4
4
  %p
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: niftier-generators
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matt Venables (originally by Ryan Bates)