Hi all , (environment : Rails 2.1, Authorization Plugin) I am setting up fixtures (w autogenerated IDs) , but I am stuck with the following issue w the roles_users table I have a users.yaml fixtures file w following info DEFAULTS: &DEFAULTS created_at: <%= 15.days.ago.to_s(:db) %> updated_at: <%= 15.days.ago.to_s(:db) %> activated_at: <%= 15.days.ago.to_s :db %> mickey: first_name: mickey last_name: rourcke email: mickey-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org franchise: two state: active <<: *DEFAULTS ..... I can define the HABTM relation directly into the ''roles.yaml'' fixtures file as follows : DEFAULTS: &DEFAULTS created_at: <%= 15.days.ago.to_s(:db) %> updated_at: <%= 15.days.ago.to_s(:db) %> ... administrator_of_two: name: administrator authorizable: two (Franchise) users: mickey <<: *DEFAULTS no need for a users_roles.yaml file the users_roles data are created into the table, BUT.... the timestamps ARE NOT set in the roles_users table... any clue ? thanks erwin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 3 Sep 2008, at 09:23, Erwin <yves_dufour-ee4meeAH724@public.gmane.org> wrote:> > Hi all , (environment : Rails 2.1, Authorization Plugin) > > I am setting up fixtures (w autogenerated IDs) , but I am stuck with > the following issue w the roles_users table >Extra attributes on habtm join tables is kinds deprecated, so I wouldn''t be surprised if the foxy fixtures stuff (which was only added in 2.0) didn''t support it. Fred> I have a users.yaml fixtures file w following info > > DEFAULTS: &DEFAULTS > created_at: <%= 15.days.ago.to_s(:db) %> > updated_at: <%= 15.days.ago.to_s(:db) %> > activated_at: <%= 15.days.ago.to_s :db %> > mickey: > first_name: mickey > last_name: rourcke > email: mickey-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org > franchise: two > state: active > <<: *DEFAULTS > ..... > > I can define the HABTM relation directly into the ''roles.yaml'' > fixtures file as follows : > > DEFAULTS: &DEFAULTS > created_at: <%= 15.days.ago.to_s(:db) %> > updated_at: <%= 15.days.ago.to_s(:db) %> > ... > administrator_of_two: > name: administrator > authorizable: two (Franchise) > users: mickey > <<: *DEFAULTS > > no need for a users_roles.yaml file the users_roles data are created > into the table, BUT.... > the timestamps ARE NOT set in the roles_users table... > > any clue ? > > thanks > > erwin > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Fred, thanks for being there... I looked into activerecord-2.1.0/lib/active_record/fixtures.rb to see if the foxy fixtures stuff was there... it''s not (I discovered this patch goggling a little bit..) I ''ll try to patch it.. but I neved did that before.. once I get the .diff file, how can I do that ? I can suppress/add lines by hand, but I suppose there is a fancy way to do it erwin On 3 sep, 09:28, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 3 Sep 2008, at 09:23, Erwin <yves_duf...-ee4meeAH724@public.gmane.org> wrote: > > > > > Hi all , (environment : Rails 2.1, Authorization Plugin) > > > I am setting up fixtures (w autogenerated IDs) , but I am stuck with > > the following issue w the roles_users table > > Extra attributes on habtm join tables is kinds deprecated, so I > wouldn''t be surprised if the foxy fixtures stuff (which was only added > in 2.0) didn''t support it. > > Fred > > > I have a users.yaml fixtures file w following info > > > DEFAULTS: &DEFAULTS > > created_at: <%= 15.days.ago.to_s(:db) %> > > updated_at: <%= 15.days.ago.to_s(:db) %> > > activated_at: <%= 15.days.ago.to_s :db %> > > mickey: > > first_name: mickey > > last_name: rourcke > > email: mic...-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org > > franchise: two > > state: active > > <<: *DEFAULTS > > ..... > > > I can define the HABTM relation directly into the ''roles.yaml'' > > fixtures file as follows : > > > DEFAULTS: &DEFAULTS > > created_at: <%= 15.days.ago.to_s(:db) %> > > updated_at: <%= 15.days.ago.to_s(:db) %> > > ... > > administrator_of_two: > > name: administrator > > authorizable: two (Franchise) > > users: mickey > > <<: *DEFAULTS > > > no need for a users_roles.yaml file the users_roles data are created > > into the table, BUT.... > > the timestamps ARE NOT set in the roles_users table... > > > any clue ? > > > thanks > > > erwin--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 3 Sep 2008, at 09:54, Erwin <yves_dufour-ee4meeAH724@public.gmane.org> wrote:> > Hi Fred, thanks for being there... > > I looked into activerecord-2.1.0/lib/active_record/fixtures.rb to > see if the foxy fixtures stuff was there... it''s not (I discovered > this patch goggling a little bit..) >It must be or you''d have to have a user_roles.yml file. Foxy fixtures is just a name - I wouldn''t be surprised if that string didn''t appear anywhere in it Fred> I ''ll try to patch it.. but I neved did that before.. > once I get the .diff file, how can I do that ? I can suppress/add > lines by hand, but I suppose there is a fancy way to do it > > erwin > > On 3 sep, 09:28, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> On 3 Sep 2008, at 09:23, Erwin <yves_duf...-ee4meeAH724@public.gmane.org> wrote: >> >> >> >>> Hi all , (environment : Rails 2.1, Authorization Plugin) >> >>> I am setting up fixtures (w autogenerated IDs) , but I am stuck with >>> the following issue w the roles_users table >> >> Extra attributes on habtm join tables is kinds deprecated, so I >> wouldn''t be surprised if the foxy fixtures stuff (which was only >> added >> in 2.0) didn''t support it. >> >> Fred >> >>> I have a users.yaml fixtures file w following info >> >>> DEFAULTS: &DEFAULTS >>> created_at: <%= 15.days.ago.to_s(:db) %> >>> updated_at: <%= 15.days.ago.to_s(:db) %> >>> activated_at: <%= 15.days.ago.to_s :db %> >>> mickey: >>> first_name: mickey >>> last_name: rourcke >>> email: mic...-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org >>> franchise: two >>> state: active >>> <<: *DEFAULTS >>> ..... >> >>> I can define the HABTM relation directly into the ''roles.yaml'' >>> fixtures file as follows : >> >>> DEFAULTS: &DEFAULTS >>> created_at: <%= 15.days.ago.to_s(:db) %> >>> updated_at: <%= 15.days.ago.to_s(:db) %> >>> ... >>> administrator_of_two: >>> name: administrator >>> authorizable: two (Franchise) >>> users: mickey >>> <<: *DEFAULTS >> >>> no need for a users_roles.yaml file the users_roles data are >>> created >>> into the table, BUT.... >>> the timestamps ARE NOT set in the roles_users table... >> >>> any clue ? >> >>> thanks >> >>> erwin > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I modified the fixtures.rb , according to the patch, and it runs well... I get the timestamps OK in the generated users_roles table.. even if HABTM is deprecated, the Authorization Plugin is still using it.... good question asked in Authorization Plugin group thanks On 3 sep, 09:57, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 3 Sep 2008, at 09:54, Erwin <yves_duf...-ee4meeAH724@public.gmane.org> wrote: > > > > > Hi Fred, thanks for being there... > > > I looked into activerecord-2.1.0/lib/active_record/fixtures.rb to > > see if the foxy fixtures stuff was there... it''s not (I discovered > > this patch goggling a little bit..) > > It must be or you''d have to have a user_roles.yml file. Foxy fixtures > is just a name - I wouldn''t be surprised if that string didn''t appear > anywhere in it > > Fred > > > I ''ll try to patch it.. but I neved did that before.. > > once I get the .diff file, how can I do that ? I can suppress/add > > lines by hand, but I suppose there is a fancy way to do it > > > erwin > > > On 3 sep, 09:28, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> On 3 Sep 2008, at 09:23, Erwin <yves_duf...-ee4meeAH724@public.gmane.org> wrote: > > >>> Hi all , (environment : Rails 2.1, Authorization Plugin) > > >>> I am setting up fixtures (w autogenerated IDs) , but I am stuck with > >>> the following issue w the roles_users table > > >> Extra attributes on habtm join tables is kinds deprecated, so I > >> wouldn''t be surprised if the foxy fixtures stuff (which was only > >> added > >> in 2.0) didn''t support it. > > >> Fred > > >>> I have a users.yaml fixtures file w following info > > >>> DEFAULTS: &DEFAULTS > >>> created_at: <%= 15.days.ago.to_s(:db) %> > >>> updated_at: <%= 15.days.ago.to_s(:db) %> > >>> activated_at: <%= 15.days.ago.to_s :db %> > >>> mickey: > >>> first_name: mickey > >>> last_name: rourcke > >>> email: mic...-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org > >>> franchise: two > >>> state: active > >>> <<: *DEFAULTS > >>> ..... > > >>> I can define the HABTM relation directly into the ''roles.yaml'' > >>> fixtures file as follows : > > >>> DEFAULTS: &DEFAULTS > >>> created_at: <%= 15.days.ago.to_s(:db) %> > >>> updated_at: <%= 15.days.ago.to_s(:db) %> > >>> ... > >>> administrator_of_two: > >>> name: administrator > >>> authorizable: two (Franchise) > >>> users: mickey > >>> <<: *DEFAULTS > > >>> no need for a users_roles.yaml file the users_roles data are > >>> created > >>> into the table, BUT.... > >>> the timestamps ARE NOT set in the roles_users table... > > >>> any clue ? > > >>> thanks > > >>> erwin--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---