Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added missing habtm_name definition.

  • Loading branch information...
commit 2a28d1500d69a1b82dc2df0697975af3dbdbc7e3 1 parent f632a24
“grin” authored committed
2  generators/role_generator_helpers.rb
View
@@ -85,4 +85,4 @@ def users_model_filename; "app/models/#{users_model_name.underscore}.rb"; end;
def users_name; "#{users_model_name.downcase}"; end;
-end
+end
3  generators/roles/roles_generator.rb
View
@@ -108,6 +108,7 @@ def render_template(name)
ERB.new(template, nil, "-").result(binding)
end
+ def habtm_name; [roles_table_name, users_table_name].sort * "_"; end
def roles_foreign_key; roles_table_name.singularize.foreign_key; end
def roles_model_filename; "app/models/#{roles_model_name.underscore}.rb"; end;
def users_foreign_key; users_table_name.singularize.foreign_key; end
@@ -117,4 +118,4 @@ def banner
"Usage: #{$0} roles RoleModelName [TargetUserModelName]"
end
-end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.