Hi.. Guys new plugin again Foreign Key Associations is a plugin that automatically creates associations based on foreign-keys. The associations are created at runtime-ie. as your ActiveRecord models are loaded-so they will always be up-to-date. For example, given a foreign-key from a customer_id column in an orders table to an id column in a customers table, the plugin creates: Order.belongs_to :customerCustomer.has_many :orders If there is a uniqueness constraint-eg unique index-on a foreign-key column, then the plugin will creates a has_one instead of a has_many. For example, given a foreign-key from an order_id column with a uniqueness constraint in an invoices table to an id column in an orders table, the plugin creates: Invoice.belongs_to :orderOrder.has_one :invoice Additionally, if there is a position column in the child table, the parent association will be created with an order clause. For example, given a foreign-key from a order_id column in an order_lines table containing a position column, to an id column in a orders table, the plugin creates: OrderLine.belongs_to :ordersOrder.has_many :lines, :order => :position The plugin also supports the creation of has_and_belongs_to_many associations. For example, given the tables product_product_categories with foreign- keys to both the product and product_categories tables, the plugin creates: Product.has_and_belongs_to_many :categoriesProductCategory.has_and_belongs_to_many :products And finally, notice that in one of the previous examples, the association name used for the Order.has_many is :lines and not :order_lines. More specifically, the plugin removes the prefix from has_many and has_one associations if the the name of parent class forms a proper prefix of the child class name. The plugin fully supports and understands the following active-record configuration properties: config.active_record.pluralize_table_names config.active_record.table_name_prefix config.active_record.table_name_suffix Installation EDGE To install using SVN: ruby script/plugin install svn://rubyforge.org/var/svn/redhillonrails/trunk/vendor/plugins/foreign_key_associations or using HTTP: ruby script/plugin install http://www.redhillonrails.org/svn/trunk/vendor/plugins/foreign_key_ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Stop flooding the group with these posts. On Sep 4, 11:48 pm, Jhonny <mba.piyushgu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi.. > > Guys new plugin again > > Foreign Key Associations is a plugin that automatically creates > associations based on foreign-keys. The associations are created at > runtime-ie. as your ActiveRecord models are loaded-so they will always > be up-to-date. > > For example, given a foreign-key from a customer_id column in an > orders table to an id column in a customers table, the plugin > creates: > > Order.belongs_to :customerCustomer.has_many :orders > If there is a uniqueness constraint-eg unique index-on a foreign-key > column, then the plugin will creates a has_one instead of a has_many. > > For example, given a foreign-key from an order_id column with a > uniqueness constraint in an invoices table to an id column in an > orders table, the plugin creates: > > Invoice.belongs_to :orderOrder.has_one :invoice > Additionally, if there is a position column in the child table, the > parent association will be created with an order clause. > > For example, given a foreign-key from a order_id column in an > order_lines table containing a position column, to an id column in a > orders table, the plugin creates: > > OrderLine.belongs_to :ordersOrder.has_many :lines, :order => :position > The plugin also supports the creation of has_and_belongs_to_many > associations. > > For example, given the tables product_product_categories with foreign- > keys to both the product and product_categories tables, the plugin > creates: > > Product.has_and_belongs_to_many :categoriesProductCategory.has_and_belongs_to_many :products > And finally, notice that in one of the previous examples, the > association name used for the Order.has_many is :lines and > not :order_lines. More specifically, the plugin removes the prefix > from has_many and has_one associations if the the name of parent class > forms a proper prefix of the child class name. > > The plugin fully supports and understands the following active-record > configuration properties: > > config.active_record.pluralize_table_names > config.active_record.table_name_prefix > config.active_record.table_name_suffix > > Installation > EDGE > To install using SVN: > ruby script/plugin install svn://rubyforge.org/var/svn/redhillonrails/trunk/vendor/plugins/foreign_key_associations > > or using HTTP: > ruby script/plugin installhttp://www.redhillonrails.org/svn/trunk/vendor/plugins/foreign_key_--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
good work buddy, flood away...you did the hard work and should be able to get some acknowledgment for it announcing developments like this is just what this mailing list is for... high fives all round...down low for Rein Henrichs On 9/5/07, Jhonny <mba.piyushgupta-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > > Hi.. > > Guys new plugin again > > > Foreign Key Associations is a plugin that automatically creates > associations based on foreign-keys. The associations are created at > runtime-ie. as your ActiveRecord models are loaded-so they will always > be up-to-date. > > For example, given a foreign-key from a customer_id column in an > orders table to an id column in a customers table, the plugin > creates: > > Order.belongs_to :customerCustomer.has_many :orders > If there is a uniqueness constraint-eg unique index-on a foreign-key > column, then the plugin will creates a has_one instead of a has_many. > > For example, given a foreign-key from an order_id column with a > uniqueness constraint in an invoices table to an id column in an > orders table, the plugin creates: > > Invoice.belongs_to :orderOrder.has_one :invoice > Additionally, if there is a position column in the child table, the > parent association will be created with an order clause. > > For example, given a foreign-key from a order_id column in an > order_lines table containing a position column, to an id column in a > orders table, the plugin creates: > > OrderLine.belongs_to :ordersOrder.has_many :lines, :order => :position > The plugin also supports the creation of has_and_belongs_to_many > associations. > > For example, given the tables product_product_categories with foreign- > keys to both the product and product_categories tables, the plugin > creates: > > Product.has_and_belongs_to_many : > categoriesProductCategory.has_and_belongs_to_many :products > And finally, notice that in one of the previous examples, the > association name used for the Order.has_many is :lines and > not :order_lines. More specifically, the plugin removes the prefix > from has_many and has_one associations if the the name of parent class > forms a proper prefix of the child class name. > > The plugin fully supports and understands the following active-record > configuration properties: > > config.active_record.pluralize_table_names > config.active_record.table_name_prefix > config.active_record.table_name_suffix > > > Installation > EDGE > To install using SVN: > ruby script/plugin install > svn://rubyforge.org/var/svn/redhillonrails/trunk/vendor/plugins/foreign_key_associations > > or using HTTP: > ruby script/plugin install > http://www.redhillonrails.org/svn/trunk/vendor/plugins/foreign_key_ > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Neither this nor any of the 15 other posts this person has made in a 15 minute span have been their work. On Sep 5, 1:49 am, "Dion Hewson" <dionhew...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> good work buddy, > > flood away...you did the hard work and should be able to get some > acknowledgment for it > > announcing developments like this is just what this mailing list is for... > > high fives all round...down low for Rein Henrichs > > On 9/5/07, Jhonny <mba.piyushgu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hi.. > > > Guys new plugin again > > > Foreign Key Associations is a plugin that automatically creates > > associations based on foreign-keys. The associations are created at > > runtime-ie. as your ActiveRecord models are loaded-so they will always > > be up-to-date. > > > For example, given a foreign-key from a customer_id column in an > > orders table to an id column in a customers table, the plugin > > creates: > > > Order.belongs_to :customerCustomer.has_many :orders > > If there is a uniqueness constraint-eg unique index-on a foreign-key > > column, then the plugin will creates a has_one instead of a has_many. > > > For example, given a foreign-key from an order_id column with a > > uniqueness constraint in an invoices table to an id column in an > > orders table, the plugin creates: > > > Invoice.belongs_to :orderOrder.has_one :invoice > > Additionally, if there is a position column in the child table, the > > parent association will be created with an order clause. > > > For example, given a foreign-key from a order_id column in an > > order_lines table containing a position column, to an id column in a > > orders table, the plugin creates: > > > OrderLine.belongs_to :ordersOrder.has_many :lines, :order => :position > > The plugin also supports the creation of has_and_belongs_to_many > > associations. > > > For example, given the tables product_product_categories with foreign- > > keys to both the product and product_categories tables, the plugin > > creates: > > > Product.has_and_belongs_to_many : > > categoriesProductCategory.has_and_belongs_to_many :products > > And finally, notice that in one of the previous examples, the > > association name used for the Order.has_many is :lines and > > not :order_lines. More specifically, the plugin removes the prefix > > from has_many and has_one associations if the the name of parent class > > forms a proper prefix of the child class name. > > > The plugin fully supports and understands the following active-record > > configuration properties: > > > config.active_record.pluralize_table_names > > config.active_record.table_name_prefix > > config.active_record.table_name_suffix > > > Installation > > EDGE > > To install using SVN: > > ruby script/plugin install > > svn://rubyforge.org/var/svn/redhillonrails/trunk/vendor/plugins/foreign_key_associations > > > or using HTTP: > > ruby script/plugin install > >http://www.redhillonrails.org/svn/trunk/vendor/plugins/foreign_key_--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Besides, the link to the plugin (that he didn''t write) isn''t even valid. On Sep 5, 2:08 am, Rein Henrichs <rein.henri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Neither this nor any of the 15 other posts this person has made in a > 15 minute span have been their work. > > On Sep 5, 1:49 am, "Dion Hewson" <dionhew...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > good work buddy, > > > flood away...you did the hard work and should be able to get some > > acknowledgment for it > > > announcing developments like this is just what this mailing list is for... > > > high fives all round...down low for Rein Henrichs > > > On 9/5/07, Jhonny <mba.piyushgu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Hi.. > > > > Guys new plugin again > > > > Foreign Key Associations is a plugin that automatically creates > > > associations based on foreign-keys. The associations are created at > > > runtime-ie. as your ActiveRecord models are loaded-so they will always > > > be up-to-date. > > > > For example, given a foreign-key from a customer_id column in an > > > orders table to an id column in a customers table, the plugin > > > creates: > > > > Order.belongs_to :customerCustomer.has_many :orders > > > If there is a uniqueness constraint-eg unique index-on a foreign-key > > > column, then the plugin will creates a has_one instead of a has_many. > > > > For example, given a foreign-key from an order_id column with a > > > uniqueness constraint in an invoices table to an id column in an > > > orders table, the plugin creates: > > > > Invoice.belongs_to :orderOrder.has_one :invoice > > > Additionally, if there is a position column in the child table, the > > > parent association will be created with an order clause. > > > > For example, given a foreign-key from a order_id column in an > > > order_lines table containing a position column, to an id column in a > > > orders table, the plugin creates: > > > > OrderLine.belongs_to :ordersOrder.has_many :lines, :order => :position > > > The plugin also supports the creation of has_and_belongs_to_many > > > associations. > > > > For example, given the tables product_product_categories with foreign- > > > keys to both the product and product_categories tables, the plugin > > > creates: > > > > Product.has_and_belongs_to_many : > > > categoriesProductCategory.has_and_belongs_to_many :products > > > And finally, notice that in one of the previous examples, the > > > association name used for the Order.has_many is :lines and > > > not :order_lines. More specifically, the plugin removes the prefix > > > from has_many and has_one associations if the the name of parent class > > > forms a proper prefix of the child class name. > > > > The plugin fully supports and understands the following active-record > > > configuration properties: > > > > config.active_record.pluralize_table_names > > > config.active_record.table_name_prefix > > > config.active_record.table_name_suffix > > > > Installation > > > EDGE > > > To install using SVN: > > > ruby script/plugin install > > > svn://rubyforge.org/var/svn/redhillonrails/trunk/vendor/plugins/foreign_key_associations > > > > or using HTTP: > > > ruby script/plugin install > > >http://www.redhillonrails.org/svn/trunk/vendor/plugins/foreign_key_--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Rein Henrichs wrote:> Besides, the link to the plugin (that he didn''t write) isn''t even > valid.I agree with Rein Henrichs, stop flooding.. "One question at the time, and wait till you get answer before asking a new one" -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
sorry guys, I had not seen all the other posts... stop flooding foo On 9/5/07, Jamal Soueidan <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > Rein Henrichs wrote: > > Besides, the link to the plugin (that he didn''t write) isn''t even > > valid. > > I agree with Rein Henrichs, stop flooding.. > > "One question at the time, and wait till you get answer before asking a > new one" > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ 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 was 2 seconds from marking all of Jhonny''s posts as spam when I noticed that they are all on topic... Stop flooding Jason On 9/5/07, Dion Hewson <dionhewson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > sorry guys, I had not seen all the other posts... > > stop flooding foo > > On 9/5/07, Jamal Soueidan < rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > > > > > Rein Henrichs wrote: > > > Besides, the link to the plugin (that he didn''t write) isn''t even > > > valid. > > > > I agree with Rein Henrichs, stop flooding.. > > > > "One question at the time, and wait till you get answer before asking a > > new one" > > -- > > Posted via http://www.ruby-forum.com/. > > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
For the record, I''m all for announcing open source developments here. I was subscribed to ruby forge for over a year before it got to be too much. I plan on making a few such announcements myself. :) However, I''m less keen on announcing other people''s hard work and conveniently forgetting to give them credit. Rein On Sep 5, 1:49 am, "Dion Hewson" <dionhew...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> good work buddy, > > flood away...you did the hard work and should be able to get some > acknowledgment for it > > announcing developments like this is just what this mailing list is for... > > high fives all round...down low for Rein Henrichs > > On 9/5/07, Jhonny <mba.piyushgu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hi.. > > > Guys new plugin again > > > Foreign Key Associations is a plugin that automatically creates > > associations based on foreign-keys. The associations are created at > > runtime-ie. as your ActiveRecord models are loaded-so they will always > > be up-to-date. > > > For example, given a foreign-key from a customer_id column in an > > orders table to an id column in a customers table, the plugin > > creates: > > > Order.belongs_to :customerCustomer.has_many :orders > > If there is a uniqueness constraint-eg unique index-on a foreign-key > > column, then the plugin will creates a has_one instead of a has_many. > > > For example, given a foreign-key from an order_id column with a > > uniqueness constraint in an invoices table to an id column in an > > orders table, the plugin creates: > > > Invoice.belongs_to :orderOrder.has_one :invoice > > Additionally, if there is a position column in the child table, the > > parent association will be created with an order clause. > > > For example, given a foreign-key from a order_id column in an > > order_lines table containing a position column, to an id column in a > > orders table, the plugin creates: > > > OrderLine.belongs_to :ordersOrder.has_many :lines, :order => :position > > The plugin also supports the creation of has_and_belongs_to_many > > associations. > > > For example, given the tables product_product_categories with foreign- > > keys to both the product and product_categories tables, the plugin > > creates: > > > Product.has_and_belongs_to_many : > > categoriesProductCategory.has_and_belongs_to_many :products > > And finally, notice that in one of the previous examples, the > > association name used for the Order.has_many is :lines and > > not :order_lines. More specifically, the plugin removes the prefix > > from has_many and has_one associations if the the name of parent class > > forms a proper prefix of the child class name. > > > The plugin fully supports and understands the following active-record > > configuration properties: > > > config.active_record.pluralize_table_names > > config.active_record.table_name_prefix > > config.active_record.table_name_suffix > > > Installation > > EDGE > > To install using SVN: > > ruby script/plugin install > > svn://rubyforge.org/var/svn/redhillonrails/trunk/vendor/plugins/foreign_key_associations > > > or using HTTP: > > ruby script/plugin install > >http://www.redhillonrails.org/svn/trunk/vendor/plugins/foreign_key_--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---