input-many enum_string

22 views
Skip to first unread message

Jim Harvey

unread,
Apr 6, 2012, 1:29:18 AM4/6/12
to hobo...@googlegroups.com
I have this in my model

fields do
  name :string
  url    :string
  type enum_string(:good, :bad, :ugly)
end

There is no controller for this model. The only way to create a new instance is in the context of an associated model, where I have this in new.dryml and edit.dryml

<foo-view:><input-many fields="name,url,type"/></input-many>

I was hoping to get a select menu for type but nothing appears. Is it possible to have an input for an EnumString in this context? Let me know if I am doing something wrong. Thanks!!


Bryan Larsen

unread,
Apr 6, 2012, 12:53:51 PM4/6/12
to hobo...@googlegroups.com
Try using something other than "type" as the name. I wouldn't be
surprised if it's used for something else in Ruby, Rails or Hobo.

Bryan

> --
> You received this message because you are subscribed to the Google Groups
> "Hobo Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/hobousers/-/zpYHtj5QPSoJ.
> To post to this group, send email to hobo...@googlegroups.com.
> To unsubscribe from this group, send email to
> hobousers+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/hobousers?hl=en.

Jim Harvey

unread,
Apr 6, 2012, 1:17:25 PM4/6/12
to hobo...@googlegroups.com
That did the trick! Thank you Bryan. 

> hobousers+unsubscribe@googlegroups.com.

Jim Harvey

unread,
Apr 6, 2012, 3:37:03 PM4/6/12
to hobo...@googlegroups.com
Hmm... Well, the form shows up and I'm able to create new instances but then I cannot edit them. The form is there for editing but nothing is saving. 

I have accessible => true set in both the parent and child models (for has_many :through relationship). I have attr_accessible set for all fields in the child model. The update permissions are set to true for the child model. Is there something else I'm overlooking??
Reply all
Reply to author
Forward
0 new messages