Hob routing error -- can't find reverse association for Ticket#technician (e.g. the :has_many that corresponds to a :belongs_to)

60 views
Skip to first unread message

Bob Sleys

unread,
Nov 11, 2012, 4:03:32 PM11/11/12
to hobo...@googlegroups.com
I understand what the router error in the subject is trying to tell me but I don't see what I've done wrong

In my Ticket model I have

  belongs_to :technician, :class_name => 'User', :inverse_of => :tech_tickets, :conditions => ['employee = ?', true]
  belongs_to :submitted_by, :class_name => "User", :creator => true, :inverse_of => :tickets

In my User model I have the following

  has_many :tech_tickets, :class_name => "Ticket", :inverse_of => :technician
  has_many :tickets, :inverse_of => :submitted_by

However when I add the following in my Ticket controller I get the error in the subject line

  auto_actions_for :technician, :index
  
  def index_for_technician
    params[:sort] ||= "problem"
    params[:search] ||= ""
    hobo_index_for :technician, :scope => [[:search, params[:search], [problem]], [:order, parse_sort_param(:problem).join(' ')]]
  end

Ignacio Huerta

unread,
Nov 12, 2012, 1:51:04 AM11/12/12
to hobo...@googlegroups.com
Hi Bob,

I have never used "inverse_of" or auto_actions_for with :index, so I've
tried to do something similar in a different way:

User model:
has_many :tech_tickets, :class_name => "Ticket", :foreign_key =>
"technician_id"
has_many :tickets, :class_name => "Ticket", :foreign_key =>
"submitted_by_id"

Ticket model:
attr_accessible :code, :technician, :technician_id, :submitted_by,
:submitted_by_id
belongs_to :technician, :class_name => 'User'
belongs_to :submitted_by, :class_name => "User", :creator => true

I tried adding "auto_actions_for :technician, :index" to the tickets
controller, but hobo_routes seems to expect a "TechTicketsController".
This is what "rake routes" says:

technician_tech_tickets GET
/users/:technician_id/tech_tickets(.:format)
tech_tickets#index_for_technician

I think a possible workaround would be to create a custom action, I
tested this in front/index.dryml and it seems to work:

<collection with="&current_user.tickets"/>

It's not probably what you are looking for but it might help ;).

Regards,
Ignacio


El 11/11/12 22:03, Bob Sleys escribi�:
> --
> You received this message because you are subscribed to the Google
> Groups "Hobo Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/hobousers/-/8BYBwu-zpHMJ.
> To post to this group, send email to hobo...@googlegroups.com.
> To unsubscribe from this group, send email to
> hobousers+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/hobousers?hl=en.

--
Ignacio Huerta Arteche
http://www.ihuerta.net
Tel�fono: 0034 645 70 77 35
Email realizado con software libre

Quiliro Ordóñez

unread,
Nov 13, 2012, 11:51:01 AM11/13/12
to hobo...@googlegroups.com
Hello,

I would like to know if there are libre (free as in freedom) Hobo
applications available. I don't care if they have a cost or not.

Thank you for the info.

--
Saludos libres,

Quiliro Ord��ez
Presidente (en conjunto con el resto de socios)
Asociaci�n de Software Libre del Ecuador - ASLE
Av de la Prensa N58-219 y Crist�bal Vaca de Castro
Quito, Ecuador
(593)2-600 8579
(593)98-454 8078

Henry Baragar

unread,
Nov 14, 2012, 12:29:00 AM11/14/12
to hobo...@googlegroups.com
On 12-11-13 11:51 AM, Quiliro Ordóñez wrote:
Hello,

I would like to know if there are libre (free as in freedom) Hobo applications available. I don't care if they have a cost or not.

Thank you for the info.


Do mean like:
https://github.com/hbaragar/Conference-Management-Application
Cheers,
Henry
-- 
Henry Baragar
Instantiated Software Inc.
http://www.instantiated.ca
Henry_Baragar.vcf

qui...@congresolibre.org

unread,
Nov 14, 2012, 1:38:36 AM11/14/12
to hobo...@googlegroups.com
> On 12-11-13 11:51 AM, Quiliro Ord��ez wrote:
>> Hello,
>>
>> I would like to know if there are libre (free as in freedom) Hobo
>> applications available. I don't care if they have a cost or not.
>>
>> Thank you for the info.
>>
>
> Do mean like:
>
> https://github.com/hbaragar/Conference-Management-Application
>

Nice application. I cannot find its license. If it is an FSF approved
license, it is exactly the type of apps I am looking for.

Henry Baragar

unread,
Nov 14, 2012, 8:45:12 AM11/14/12
to hobo...@googlegroups.com
On 12-11-14 01:38 AM, qui...@congresolibre.org wrote:
I had not put in a licence document. It would be either GNU or BSD.
Henry_Baragar.vcf

Ignacio Huerta

unread,
Nov 14, 2012, 8:53:03 AM11/14/12
to hobo...@googlegroups.com
Nice app Henry!

Quiliro, we have published a few small apps in Github:

https://github.com/suyccom/member-manage

https://github.com/suyccom/sgformacionls

https://github.com/suyccom/Hobo-Github-Gui

http://liberatubici.org/ (the code is free, although we haven't pushed
it yet to Github, it's currently in an old internal subversion).


I don't think the apps have a license yet, but we are FSF enthusiasts,
so GPL or similar would be our choice.

Regards,
Ignacio

El 14/11/12 07:38, qui...@congresolibre.org escribió:
--
Ignacio Huerta Arteche
http://www.ihuerta.net
Teléfono: 0034 645 70 77 35

Bryan Larsen

unread,
Nov 14, 2012, 8:53:21 AM11/14/12
to hobo...@googlegroups.com
I would ping Matthias Leihs about
https://github.com/BI/Mapping-Literature. I believe that it's
supposed to be open source, although he has not added a license file.

https://github.com/Hobo/hobocookbook and
https://github.com/Hobo/agility-gitorial are also open source. The
license should be the same as hobo itself, although I will double
check.

Most of our plugins have MIT-LICENSE files. Those that don't,
should. I'll ping any contributors and make sure they get added.

Bryan

On Tue, Nov 13, 2012 at 11:51 AM, Quiliro Ordóñez
<qui...@congresolibre.org> wrote:
> Hello,
>
> I would like to know if there are libre (free as in freedom) Hobo
> applications available. I don't care if they have a cost or not.
>
> Thank you for the info.
>
> --
> Saludos libres,
>
> Quiliro Ordóñez
> Presidente (en conjunto con el resto de socios)
> Asociación de Software Libre del Ecuador - ASLE
> Av de la Prensa N58-219 y Cristóbal Vaca de Castro
> Quito, Ecuador
> (593)2-600 8579
> (593)98-454 8078
>
> --
> You received this message because you are subscribed to the Google Groups
> "Hobo Users" group.

kevinpfromnm

unread,
Nov 14, 2012, 5:11:58 PM11/14/12
to hobo...@googlegroups.com, qui...@asle.ec, qui...@congresolibre.org
Anything in my github repo is open source (and in general on github it's supposed to be open source unless a private repo though I'm not sure of the license).  In their terms: "By setting your repositories to be viewed publicly, you agree to allow others to view and fork your repositories." (emphasis mine)

I have no license files so if you need something specific, just shoot me an email.


On Tuesday, November 13, 2012 9:52:16 AM UTC-7, Quiliro Ordóñez wrote:
Hello,

I would like to know if there are libre (free as in freedom) Hobo
applications available. I don't care if they have a cost or not.

Thank you for the info.

--
Saludos libres,

Quiliro Ord��ez
Presidente (en conjunto con el resto de socios)
Asociaci�n de Software Libre del Ecuador - ASLE
Av de la Prensa N58-219 y Crist�bal Vaca de Castro

Owen Dall

unread,
Nov 14, 2012, 5:21:21 PM11/14/12
to hobo...@googlegroups.com
Yes, our agreement with Matthias is that it be MIT, I believe....

-Owen
--
-Owen
 

Owen Dall

Vice President | Chief Technology Officer

Barquin International 

www.barquin.com

Office: 202.296.7147 | Mobile: tel:410.991.0811

Fax: 202.296.8903 | email: od...@barquin.com


hbaragar

unread,
Oct 2, 2013, 2:40:55 AM10/2/13
to hobo...@googlegroups.com
Bob,

I know that this response is a little late, but I just got bit by the same bug.  I have tracked down the bug, fixed it and it has been merged into Hobo/master.

Take a look at https://github.com/Hobo/hobo/issues/40 if you are interested in the (simple) fix.

Regards,
Henry
Reply all
Reply to author
Forward
0 new messages