Be sure to ask lots of questions here, too; we're very friendly.
> I just moved to Phoenix and am new to Rails development. I'm coming
> from PHP circa 2005.
Big change.
Welcome to Phoenix, and Ruby on Rails!
>
> I plan to swing by the meeting on Nov 9 and will be happy to talk in
> person or on email.
>
Excellent. You'll meet great Rubyists, and I'm sure you'll get help
with your questions.
Looking forwarding to meeting you.
James
--
www.jamesbritt.com - Playing with Better Toys
www.ruby-doc.org - Ruby Help & Documentation
www.rubystuff.com - The Ruby Store for Ruby Stuff
www.neurogami.com - Smart application development
BTW, after the meeting we're planning on going to Havana Cafe, on Bell
Road and 64th st.
Hopefully you'll plan to join us there as well.
James
---
James Britt wrote:
> Be sure to ask lots of questions here, too; we're very friendly.
Whew, ok. Here goes: I'm working with a model that has just three
classes: events, searches, and locations. Searches belong to events,
and locations belong to both searches and events. Locations are an
admin-controlled class; they already exist (e.g., concert venues,
airports). I'd like to present users a form that has inputs for 1
event and X searches where each event and each search has one
location. My questions are
1. How do I present a form like that creates new objects in two
different classes (e.g., event and search)?
2. How do I create more than one object in a single form (e.g., many searches)?
3. How do I make select inputs for existing objects (e.g., locations)?
That's a start anyway. I've worked through the blog tutorial online
and through most of the Agile book, but I'm stuck. I know how to do
that stuff in PHP, but I'm trying to join the new century.
> BTW, after the meeting we're planning on going to Havana Cafe, on Bell
> Road and 64th st.
Excellent! I'll plan on it. Thanks for the heads up.
Chris Conrey wrote:
> going on where you can be around good people all the time and learn. If you
> haven't already heard about Gangplank, http://gangplankhq.com, you should
> check us out. Open coworking and collaborative space.
I have been to Gangplank a couple of times. I've worked in a couple
other coworking environments, and I dig your space. I feel a little
awkward about interrupting or asking for help from strangers, so I
haven't really met anyone there yet. Now that we've "met" online,
it'll be easier for me to say "hey" when I'm there again. Thanks!
See you Monday,
Libby
Looks like 2.3 supports "accepts_nested_attributes_for" and its
associated methods. I started with your suggestion and ended up there
while working through that tutorial. Example = awesome. In case anyone
else is running into the same problem, the latest tutorial is here:
http://github.com/alloy/complex-form-examples
> And here is how to make selects with existing objects:
>
> http://guide.rails.info/form_helpers.html#making-select-boxes-with-ease
This link got me really close too; turns out I was looking for
"collection_select":
http://shiningthrough.co.uk/blog/show/6
http://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html#M001625
The hardest parts about getting help online are knowing what search
terms to use and telling the crap from the good stuff. I'm grateful to
you for sending me examples, search terms, and an authoritative place
for help (guides.rails.info). Makes my life lots easier. Thank you!
Libby
I like http://railsbrain.com and http://rubybrain.com better than
gotapi nowadays. They have multiple versions, and the Ajaxyness and
UI seem faster and better.
Then again, if I know the exact method I want to learn about, my first
option is usually to just google for ruby methodname, and
api.rubyonrails.org is the first hit. I usually only do
railsbrain/rubybrain if I don't know exactly what I'm looking for, and
I need to browse around classes and methods.
-- Chad