How open are you to switching to Hobo 1.4? If so, I'll take a first cut at creating a Hobo plugin for you based around tokeninput.
I would like to create a small collection of Hobo plugins based on jQuery widgets to "get the ball rolling" so to speak. It's pretty easy to do, but the more varied the available examples, the better. Bryan On Sun, Mar 25, 2012 at 8:53 PM, Scorpio <[email protected]> wrote: > Hello, I've been trying to integrate jQuery Tokeninput with my hobo > app as shown here > http://railscasts.com/episodes/258-token-fields?view=asciicast > > Being unable to do that I created a fresh dummy app to test it out > I've created the 3 models with fields as shown in the cast > I installed the hobo jquery gem pre2 for 1.3 > installed via gem as instructed here > https://github.com/bryanlarsen/hobo-jquery/tree/rails3 in the readme. > > I've add the tokeninput js and css files according to the cast. same > with js code. > > The only deviation from the cast is using > > attr_accessor :author_tokens, :type => :string > > instead of the reader as doing attr_reader :author_tokens caused a > whole mess of errors in hobo and I took a look at the hobofields api > and it doesn't say it's supported so that's my best guess. > > can anyone do a quick read of the mentioned resources and help me > figure out what I'm doing wrong? it seems to work to the point of > adding a comma separated list and accessing authors.json. It looks as > if the JQ doesn't kick in at all. (yes, I've been through the > procedure more times than I can count symbol by symbol) > > When the demo app starts working there will be also the issue of > porting that to Messages from books and to Users from Authors. It > might get tricky as trying to overwrite dryml to act as the partial is > something I can't get to work. That is why I also did not add the > preloding on edit as I have no idea how to do > <%= f.text_field :author_tokens, "data-pre" => > @book.authors.map(&:attributes).to_json %> > in hobo. > > Thanks in Advance > > -- > You received this message because you are subscribed to the Google Groups > "Hobo Users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/hobousers?hl=en. > -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/hobousers?hl=en.
