This was so that an Audience calendar would be completely different from
a Stream calendar. Now I want them to be basically the same thing just
with a different categorization, so I did the above changes. The
problem is that now none of the events I make and put in an audience
calendar get saved to the audience calendar.
I think it’s an issue with there being too many connections (events -
audiences - stamps - streams) or something like that. Can somebody
please enlighten me about what’s happening and how i could possibly fix
it?
This was so that an Audience calendar would be completely different
from
a Stream calendar. Now I want them to be basically the same thing
just
with a different categorization, so I did the above changes. The
problem is that now none of the events I make and put in an audience
calendar get saved to the audience calendar.
What is it you’re doing that isn’t producing the expected result?
This was so that an Audience calendar would be completely different
from
a Stream calendar. Now I want them to be basically the same thing
just
with a different categorization, so I did the above changes. The
problem is that now none of the events I make and put in an audience
calendar get saved to the audience calendar.
What is it you’re doing that isn’t producing the expected result?
Fred
My site displays a list of all the calendars (audiences and streams) and
each has a link that shows how many events are in the given calendar.
This link should go to a page that lists all the events in the calendar.
Before changing the code, the audience calendars’ links displayed the
correct numbers and the events appeared as they should when I clicked
the link. Now for all the audiences, the link shows that there are 0
events in it. I think this could be because I’m no longer using the
“audiences_events” table I was using with has_and_belongs_to_many and
the events that were stored in there before aren’t getting switched over
to wherever they should be? lol I don’t really know what’s going on in
the database with these changes, I’ve only been using Ruby on Rails for
a couple weeks now.
Before changing the code, the audience calendars’ links displayed the
correct numbers and the events appeared as they should when I clicked
the link. Now for all the audiences, the link shows that there are 0
events in it. I think this could be because I’m no longer using the
“audiences_events” table I was using with has_and_belongs_to_many and
the events that were stored in there before aren’t getting switched
over
to wherever they should be? lol I don’t really know what’s going on in
the database with these changes, I’ve only been using Ruby on Rails
for
a couple weeks now.
Well the contents of audiences_events is certainly not going to get
magically get migrated for you.
Should I be using has_many_polymorphs instead? There seems to be an
extra connection I’m trying to make than on any other many-to-many
example I’ve looked up.
every row in the audiences_events table will become a row in the
stamps table by the looks of it.
Fred
Would I have to do that manually? If so, it wouldn’t be hard to do in
the test database…but when we go to the production database there are
a ton of rows in audiences_events that would have to be switched over
Would I have to do that manually? If so, it wouldn’t be hard to do in
the test database…but when we go to the production database there
are
a ton of rows in audiences_events that would have to be switched over
I suggest you write a script that does that (and test it on a copy of
the production database first!)
Fred
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.