diff options
Diffstat (limited to 'lib/generators/nifty/scaffold/templates/model.rb')
-rw-r--r-- | lib/generators/nifty/scaffold/templates/model.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/generators/nifty/scaffold/templates/model.rb b/lib/generators/nifty/scaffold/templates/model.rb new file mode 100644 index 0000000..fe5f980 --- /dev/null +++ b/lib/generators/nifty/scaffold/templates/model.rb @@ -0,0 +1,4 @@ +class <%= class_name %> < ActiveRecord::Base +<%= " set_table_name :#{table_name}\n" if table_name -%> + attr_accessible <%= model_attributes.map { |a| ":#{a.name}" }.join(", ") %> +end |