Skip to content

Commit

Permalink
fix hm & bt options on resource generators
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanlarsen committed Dec 12, 2012
1 parent 2e0c9c1 commit 6f9a876
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Expand Up @@ -7,7 +7,7 @@
<% end -%>
timestamps
end
attr_accessible <%= accessible_attributes.map {|a| ":#{a.name}"}.join ", " %>
attr_accessible <%= accessible_attributes.map {|a| ":#{a}"}.join ", " %>
<% for bt in bts -%>
belongs_to :<%= bt %>
Expand Down
Expand Up @@ -7,7 +7,7 @@
timestamps
<% end -%>
end
attr_accessible <%= accessible_attributes.map {|a| ":#{a.name}"}.join ", " %>
attr_accessible <%= accessible_attributes.map {|a| ":#{a}"}.join ", " %>
<% for bt in bts -%>
belongs_to :<%= bt %>
Expand Down
2 changes: 1 addition & 1 deletion hobo_support/lib/generators/hobo_support/model.rb
Expand Up @@ -39,7 +39,7 @@ def field_attributes
end

def accessible_attributes
field_attributes + bts.map {|bt| bt+"_id"} + bts + hms
field_attributes.*.name + bts.map {|bt| "#{bt}_id"} + bts + hms
end

def hms
Expand Down

0 comments on commit 6f9a876

Please sign in to comment.