Thanks to everyone for all the help, things are moving ahead much more
smoothly for me this evening.
Already dipping its toes in the production environment, the team as
now defined 217 employees in the app. The oddity is that I'm getting
precisely 101 options in an employee select (generated by a belongs-to
association). In the html, there's one <option value=""> for "None"
followed by <option value=... for the first 100 employees, in alpha
order as required by my set_default_order tag.
Now, it looks like the SQL being generated to populate the drop-down
is the culprit, as my console window shows:
SELECT * FROM 'employees' LIMIT 100
Where's this 100 coming from -- hobo? rails? More important, how do I
work around it?
found it! appears to be hardwired, non-parametric constraint built
into vendor/plugins/hobo/hobo/taglibs/rapid_forms.dryml. Any
suggestions how to fix this? Based on browsing a ton of source
looking for this, seems like limit probably ought to be set equal to
the count of records... or at very least turned into an option.
<def tag="select-one" attrs="include-none, blank-message, options,
sort"><%
raise HoboError.new("Not allowed to edit #{this_field}") if !
attributes[:disabled] && !can_edit?
> Thanks to everyone for all the help, things are moving ahead much more
> smoothly for me this evening.
> Already dipping its toes in the production environment, the team as
> now defined 217 employees in the app. The oddity is that I'm getting
> precisely 101 options in an employee select (generated by a belongs-to
> association). In the html, there's one <option value=""> for "None"
> followed by <option value=... for the first 100 employees, in alpha
> order as required by my set_default_order tag.
> Now, it looks like the SQL being generated to populate the drop-down
> is the culprit, as my console window shows:
> SELECT * FROM 'employees' LIMIT 100
> Where's this 100 coming from -- hobo? rails? More important, how do I
> work around it?
Trying to work around the LIMIT 100 issue by using <name-one>, likely
a better practice in this situation anyway. However, I'm getting this
routing error as soon as I start typing in the autocomplete field:
Processing ApplicationController#index (for 127.0.0.1 at 2009-05-22
01:10:16) [GET]
Parameters: {"query"=>"gr"}
ActionController::RoutingError (No route matches "/thiss/
complete_employee_name" with {:method=>:get}):
Here's my source - checked against older postings here plus the
Controllers section of the manual and the Agility tutorial - unable to
find any material differences from what should work. Only things I
don't understand right off is the "thiss" in the route and the
collection=find_instance line (but seems unlikely that relates to the
routing error).
class CollectionController < ApplicationController
hobo_model_controller
auto_actions :all
autocomplete :employee_name do
collection = find_instance
hobo_completions :name, Employee
end
end
> found it! appears to be hardwired, non-parametric constraint built
> into vendor/plugins/hobo/hobo/taglibs/rapid_forms.dryml. Any
> suggestions how to fix this? Based on browsing a ton of source
> looking for this, seems like limit probably ought to be set equal to
> the count of records... or at very least turned into an option.
> On May 21, 7:29 pm, Montgomery Kosma <mko...@gmail.com> wrote:
> > Thanks to everyone for all the help, things are moving ahead much more
> > smoothly for me this evening.
> > Already dipping its toes in the production environment, the team as
> > now defined 217 employees in the app. The oddity is that I'm getting
> > precisely 101 options in an employee select (generated by a belongs-to
> > association). In the html, there's one <option value=""> for "None"
> > followed by <option value=... for the first 100 employees, in alpha
> > order as required by my set_default_order tag.
> > Now, it looks like the SQL being generated to populate the drop-down
> > is the culprit, as my console window shows:
> > SELECT * FROM 'employees' LIMIT 100
> > Where's this 100 coming from -- hobo? rails? More important, how do I
> > work around it?
> Based on browsing a ton of source > looking for this, seems like limit probably ought to be set equal to > the count of records... or at very least turned into an option.
If you open a bug, I can certainly parameterize it for you. Or if you parameterize it and send me a patch, I'll apply it.
Are you defining @collection anywhere? It's not a magic variable, it
has to be defined in your controller. In the agility tutorial,
@project is defined in the show method. The route for the completer
is reflected from complete-target and completer.
cheers,
Bryan
On 5/21/09, Montgomery Kosma <mko...@gmail.com> wrote:
> Trying to work around the LIMIT 100 issue by using <name-one>, likely
> a better practice in this situation anyway. However, I'm getting this
> routing error as soon as I start typing in the autocomplete field:
> Processing ApplicationController#index (for 127.0.0.1 at 2009-05-22
> 01:10:16) [GET]
> Parameters: {"query"=>"gr"}
> ActionController::RoutingError (No route matches "/thiss/
> complete_employee_name" with {:method=>:get}):
> Here's my source - checked against older postings here plus the
> Controllers section of the manual and the Agility tutorial - unable to
> find any material differences from what should work. Only things I
> don't understand right off is the "thiss" in the route and the
> collection=find_instance line (but seems unlikely that relates to the
> routing error).
> class CollectionController < ApplicationController
> hobo_model_controller
> auto_actions :all
> autocomplete :employee_name do
> collection = find_instance
> hobo_completions :name, Employee
> end
> end
> On May 22, 12:11 am, Montgomery Kosma <mko...@gmail.com> wrote:
>> found it! appears to be hardwired, non-parametric constraint built
>> into vendor/plugins/hobo/hobo/taglibs/rapid_forms.dryml. Any
>> suggestions how to fix this? Based on browsing a ton of source
>> looking for this, seems like limit probably ought to be set equal to
>> the count of records... or at very least turned into an option.
>> On May 21, 7:29 pm, Montgomery Kosma <mko...@gmail.com> wrote:
>> > Thanks to everyone for all the help, things are moving ahead much more
>> > smoothly for me this evening.
>> > Already dipping its toes in the production environment, the team as
>> > now defined 217 employees in the app. The oddity is that I'm getting
>> > precisely 101 options in an employee select (generated by a belongs-to
>> > association). In the html, there's one <option value=""> for "None"
>> > followed by <option value=... for the first 100 employees, in alpha
>> > order as required by my set_default_order tag.
>> > Now, it looks like the SQL being generated to populate the drop-down
>> > is the culprit, as my console window shows:
>> > SELECT * FROM 'employees' LIMIT 100
>> > Where's this 100 coming from -- hobo? rails? More important, how do I
>> > work around it?
The reason for the limit 100 was to stop hobo generating impossibly
massive queries sometimes with the auto generated app and existing
databases. Select menus with hundreds of thousands of rows in them,
crashing your whole machine, stuff like that. The idea was to limit it
to a number that was way higher than what you would practically need.
I was thinking that anything above about 50 you should be using a
different UI. Then again I'm now thinking that people do use select
menus for choosing countries, and I think there are about 200 of those
if you include them all, so maybe 100 was too low.
So it was just a safety net. I'm not really sure there's a good reason
to parameterize it is there? When would you use that? (e.g. if we
raise the limit). Then again hard wired constants are lame of course
so maybe we should do it anyway : )
Hard-wired (and undocumented!) constraints are kind of lame, yes. I
see 4 possibilites:
1. increase hard-wired limit - easy, but issue may arise again
2. set LIMIT equal to COUNT - but that's probably the same as no limit
3. add and document a parameter - pretty much solves it, and pretty
easy
4. nicest solution, add a "more options..." item after the first 100
which refreshes the drop-down and pulls in the next 100 items. Sounds
hard.
On May 22, 11:53 am, Tom Locke <t...@tomlocke.com> wrote:
> The reason for the limit 100 was to stop hobo generating impossibly
> massive queries sometimes with the auto generated app and existing
> databases. Select menus with hundreds of thousands of rows in them,
> crashing your whole machine, stuff like that. The idea was to limit it
> to a number that was way higher than what you would practically need.
> I was thinking that anything above about 50 you should be using a
> different UI. Then again I'm now thinking that people do use select
> menus for choosing countries, and I think there are about 200 of those
> if you include them all, so maybe 100 was too low.
> So it was just a safety net. I'm not really sure there's a good reason
> to parameterize it is there? When would you use that? (e.g. if we
> raise the limit). Then again hard wired constants are lame of course
> so maybe we should do it anyway : )
> Hard-wired (and undocumented!) constraints are kind of lame, yes. I
> see 4 possibilites:
> 1. increase hard-wired limit - easy, but issue may arise again
> 2. set LIMIT equal to COUNT - but that's probably the same as no limit
> 3. add and document a parameter - pretty much solves it, and pretty
> easy
> 4. nicest solution, add a "more options..." item after the first 100
> which refreshes the drop-down and pulls in the next 100 items. Sounds
> hard.
> On May 22, 11:53 am, Tom Locke <t...@tomlocke.com> wrote:
>> The reason for the limit 100 was to stop hobo generating impossibly
>> massive queries sometimes with the auto generated app and existing
>> databases. Select menus with hundreds of thousands of rows in them,
>> crashing your whole machine, stuff like that. The idea was to limit
>> it
>> to a number that was way higher than what you would practically need.
>> I was thinking that anything above about 50 you should be using a
>> different UI. Then again I'm now thinking that people do use select
>> menus for choosing countries, and I think there are about 200 of
>> those
>> if you include them all, so maybe 100 was too low.
>> So it was just a safety net. I'm not really sure there's a good
>> reason
>> to parameterize it is there? When would you use that? (e.g. if we
>> raise the limit). Then again hard wired constants are lame of course
>> so maybe we should do it anyway : )
Bryan - @collection looks magical to me -- I don't define it, but
debugger (thanks again for that tip!) shows @collection == current
collection object (edit) or blank collection object (new).
Further testing shows that the Employee autocomplete code works
perfectly on an Edit Collection -- the routing error occurs only when
you type in the field on a New Collection page:
Processing ApplicationController#index (for 127.0.0.1 at 2009-05-22
16:06:47) [GET]
Parameters: {"query"=>"ab"}
ActionController::RoutingError (No route matches "/thiss/
complete_employee_name" with {:method=>:get}):
Rendering rescues/layout (not_found)
On May 22, 11:18 am, Bryan Larsen <bryan.lar...@gmail.com> wrote:
> Are you defining @collection anywhere? It's not a magic variable, it
> has to be defined in your controller. In the agility tutorial,
> @project is defined in the show method. The route for the completer
> is reflected from complete-target and completer.
> cheers,
> Bryan
> On 5/21/09, Montgomery Kosma <mko...@gmail.com> wrote:
> > Trying to work around the LIMIT 100 issue by using <name-one>, likely
> > a better practice in this situation anyway. However, I'm getting this
> > routing error as soon as I start typing in the autocomplete field:
> > Processing ApplicationController#index (for 127.0.0.1 at 2009-05-22
> > 01:10:16) [GET]
> > Parameters: {"query"=>"gr"}
> > ActionController::RoutingError (No route matches "/thiss/
> > complete_employee_name" with {:method=>:get}):
> > Here's my source - checked against older postings here plus the
> > Controllers section of the manual and the Agility tutorial - unable to
> > find any material differences from what should work. Only things I
> > don't understand right off is the "thiss" in the route and the
> > collection=find_instance line (but seems unlikely that relates to the
> > routing error).
> > class CollectionController < ApplicationController
> > hobo_model_controller
> > auto_actions :all
> > autocomplete :employee_name do
> > collection = find_instance
> > hobo_completions :name, Employee
> > end
> > end
> > On May 22, 12:11 am, Montgomery Kosma <mko...@gmail.com> wrote:
> >> found it! appears to be hardwired, non-parametric constraint built
> >> into vendor/plugins/hobo/hobo/taglibs/rapid_forms.dryml. Any
> >> suggestions how to fix this? Based on browsing a ton of source
> >> looking for this, seems like limit probably ought to be set equal to
> >> the count of records... or at very least turned into an option.
> >> On May 21, 7:29 pm, Montgomery Kosma <mko...@gmail.com> wrote:
> >> > Thanks to everyone for all the help, things are moving ahead much more
> >> > smoothly for me this evening.
> >> > Already dipping its toes in the production environment, the team as
> >> > now defined 217 employees in the app. The oddity is that I'm getting
> >> > precisely 101 options in an employee select (generated by a belongs-to
> >> > association). In the html, there's one <option value=""> for "None"
> >> > followed by <option value=... for the first 100 employees, in alpha
> >> > order as required by my set_default_order tag.
> >> > Now, it looks like the SQL being generated to populate the drop-down
> >> > is the culprit, as my console window shows:
> >> > SELECT * FROM 'employees' LIMIT 100
> >> > Where's this 100 coming from -- hobo? rails? More important, how do I
> >> > work around it?
added ticket #424 on this. Not trying to do it myself for fear of
generating more questions here and generating more "where the hell's
the application?" inquiries from my team. Thanks, guys.
On May 22, 2:39 pm, Tom Locke <t...@tomlocke.com> wrote:
> On 22 May 2009, at 19:32, Montgomery Kosma wrote:
> > Hard-wired (and undocumented!) constraints are kind of lame, yes. I
> > see 4 possibilites:
> > 1. increase hard-wired limit - easy, but issue may arise again
> > 2. set LIMIT equal to COUNT - but that's probably the same as no limit
> > 3. add and document a parameter - pretty much solves it, and pretty
> > easy
> > 4. nicest solution, add a "more options..." item after the first 100
> > which refreshes the drop-down and pulls in the next 100 items. Sounds
> > hard.
> > On May 22, 11:53 am, Tom Locke <t...@tomlocke.com> wrote:
> >> The reason for the limit 100 was to stop hobo generating impossibly
> >> massive queries sometimes with the auto generated app and existing
> >> databases. Select menus with hundreds of thousands of rows in them,
> >> crashing your whole machine, stuff like that. The idea was to limit
> >> it
> >> to a number that was way higher than what you would practically need.
> >> I was thinking that anything above about 50 you should be using a
> >> different UI. Then again I'm now thinking that people do use select
> >> menus for choosing countries, and I think there are about 200 of
> >> those
> >> if you include them all, so maybe 100 was too low.
> >> So it was just a safety net. I'm not really sure there's a good
> >> reason
> >> to parameterize it is there? When would you use that? (e.g. if we
> >> raise the limit). Then again hard wired constants are lame of course
> >> so maybe we should do it anyway : )
I have narrowed this down a little bit, perhaps. Still looks like --
for a reason I cannot determine -- the routing is not being generated
correctly for autocomplete on a New page:
For the working (edit controller) situation, here's what the log
output shows about the routing:
Processing CollectionsController#edit (for 127.0.0.1 at 2009-05-26
20:35:26) [GET]
Parameters: {"id"=>"1-archive-pst"}
... and when keys are typed in the autocomplete field:
Processing CollectionsController#complete_custodian_name (for
127.0.0.1 at 2009-05-26 20:35:38) [GET]
Parameters: {"id"=>"1", "query"=>"a"}
Now, from the New Collection page, here's the development.log output.
Best clue may be that this is processing ApplicationController#index
-- not sure how or why it's getting there. Maybe because there is no
current object -- i.e., the current id is nil? Not sure why
complete_custodian_name needs an id as a parameter anyway....
Processing CollectionsController#new (for 127.0.0.1 at 2009-05-26
20:41:43) [GET]
...
Processing ApplicationController#index (for 127.0.0.1 at 2009-05-26
20:41:57) [GET]
Parameters: {"query"=>"and"}
ActionController::RoutingError (No route matches "/thiss/
complete_custodian_name" with {:method=>:get}):
so I spend the last hour or so trying to read model_router.rb and
model_controller.rb, but I'm afraid it's beyond my current level of
expertise to parse that source. Too many layers, and I don't know
where to begin.
Help!
On May 22, 4:17 pm, Montgomery Kosma <mko...@gmail.com> wrote:
> Bryan - @collection looks magical to me -- I don't define it, but
> debugger (thanks again for that tip!) shows @collection == current
> collection object (edit) or blank collection object (new).
> Further testing shows that the Employee autocomplete code works
> perfectly on an Edit Collection -- the routing error occurs only when
> you type in the field on a New Collection page:
> ActionController::RoutingError (No route matches "/thiss/
> complete_employee_name" with {:method=>:get}):
> Rendering rescues/layout (not_found)
> On May 22, 11:18 am, Bryan Larsen <bryan.lar...@gmail.com> wrote:
> > Are you defining @collection anywhere? It's not a magic variable, it
> > has to be defined in your controller. In the agility tutorial,
> > @project is defined in the show method. The route for the completer
> > is reflected from complete-target and completer.
> > cheers,
> > Bryan
> > On 5/21/09, Montgomery Kosma <mko...@gmail.com> wrote:
> > > Trying to work around the LIMIT 100 issue by using <name-one>, likely
> > > a better practice in this situation anyway. However, I'm getting this
> > > routing error as soon as I start typing in the autocomplete field:
> > > Here's my source - checked against older postings here plus the
> > > Controllers section of the manual and the Agility tutorial - unable to
> > > find any material differences from what should work. Only things I
> > > don't understand right off is the "thiss" in the route and the
> > > collection=find_instance line (but seems unlikely that relates to the
> > > routing error).
> > > On May 22, 12:11 am, Montgomery Kosma <mko...@gmail.com> wrote:
> > >> found it! appears to be hardwired, non-parametric constraint built
> > >> into vendor/plugins/hobo/hobo/taglibs/rapid_forms.dryml. Any
> > >> suggestions how to fix this? Based on browsing a ton of source
> > >> looking for this, seems like limit probably ought to be set equal to
> > >> the count of records... or at very least turned into an option.
> > >> On May 21, 7:29 pm, Montgomery Kosma <mko...@gmail.com> wrote:
> > >> > Thanks to everyone for all the help, things are moving ahead much more
> > >> > smoothly for me this evening.
> > >> > Already dipping its toes in the production environment, the team as
> > >> > now defined 217 employees in the app. The oddity is that I'm getting
> > >> > precisely 101 options in an employee select (generated by a belongs-to
> > >> > association). In the html, there's one <option value=""> for "None"
> > >> > followed by <option value=... for the first 100 employees, in alpha
> > >> > order as required by my set_default_order tag.
> > >> > Now, it looks like the SQL being generated to populate the drop-down
> > >> > is the culprit, as my console window shows:
> > >> > SELECT * FROM 'employees' LIMIT 100
> > >> > Where's this 100 coming from -- hobo? rails? More important, how do I
> > >> > work around it?
On May 22, 4:17 pm, Montgomery Kosma <mko...@gmail.com> wrote:
> Bryan - @collection looks magical to me -- I don't define it, but
> debugger (thanks again for that tip!) shows @collection == current
> collection object (edit) or blank collection object (new).
> Further testing shows that the Employee autocomplete code works
> perfectly on an Edit Collection -- the routing error occurs only when
> you type in the field on a New Collection page:
> ActionController::RoutingError (No route matches "/thiss/
> complete_employee_name" with {:method=>:get}):
> Rendering rescues/layout (not_found)
> On May 22, 11:18 am, Bryan Larsen <bryan.lar...@gmail.com> wrote:
> > Are you defining @collection anywhere? It's not a magic variable, it
> > has to be defined in your controller. In the agility tutorial,
> > @project is defined in the show method. The route for the completer
> > is reflected from complete-target and completer.
> > cheers,
> > Bryan
> > On 5/21/09, Montgomery Kosma <mko...@gmail.com> wrote:
> > > Trying to work around the LIMIT 100 issue by using <name-one>, likely
> > > a better practice in this situation anyway. However, I'm getting this
> > > routing error as soon as I start typing in the autocomplete field:
> > > Here's my source - checked against older postings here plus the
> > > Controllers section of the manual and the Agility tutorial - unable to
> > > find any material differences from what should work. Only things I
> > > don't understand right off is the "thiss" in the route and the
> > > collection=find_instance line (but seems unlikely that relates to the
> > > routing error).
> > > On May 22, 12:11 am, Montgomery Kosma <mko...@gmail.com> wrote:
> > >> found it! appears to be hardwired, non-parametric constraint built
> > >> into vendor/plugins/hobo/hobo/taglibs/rapid_forms.dryml. Any
> > >> suggestions how to fix this? Based on browsing a ton of source
> > >> looking
On Thursday, May 21, 2009 4:29:19 PM UTC-7, Montgomery Kosma wrote:
> Thanks to everyone for all the help, things are moving ahead much more > smoothly for me this evening.
> Already dipping its toes in the production environment, the team as > now defined 217 employees in the app. The oddity is that I'm getting > precisely 101 options in an employee select (generated by a belongs-to > association). In the html, there's one <option value=""> for "None" > followed by <option value=... for the first 100 employees, in alpha > order as required by my set_default_order tag.
> Now, it looks like the SQL being generated to populate the drop-down > is the culprit, as my console window shows:
> SELECT * FROM 'employees' LIMIT 100
> Where's this 100 coming from -- hobo? rails? More important, how do I > work around it?
On Thursday, June 7, 2012 1:09:21 PM UTC-4, d@Ve wrote:
> three years on, and i am encountering the same issue when using > auto-complete on a new document:
> *ActionController::RoutingError (No route matches > "/thiss/complete_user_name")*
> any resolution? ~daVe
> On Thursday, May 21, 2009 4:29:19 PM UTC-7, Montgomery Kosma wrote:
>> Thanks to everyone for all the help, things are moving ahead much more >> smoothly for me this evening.
>> Already dipping its toes in the production environment, the team as >> now defined 217 employees in the app. The oddity is that I'm getting >> precisely 101 options in an employee select (generated by a belongs-to >> association). In the html, there's one <option value=""> for "None" >> followed by <option value=... for the first 100 employees, in alpha >> order as required by my set_default_order tag.
>> Now, it looks like the SQL being generated to populate the drop-down >> is the culprit, as my console window shows:
>> SELECT * FROM 'employees' LIMIT 100
>> Where's this 100 coming from -- hobo? rails? More important, how do I >> work around it?
Montgomery's email was about a problem with select-one. The "limit"
attribute has existed on select-one for quite some time now to fix his
problem.
Your problem is with name-one. It appears that you need to explicitly
specify the complete-target attribute. If you provide more context I
can probably help you further.
On Thu, Jun 7, 2012 at 1:09 PM, d@Ve <kungfuk...@gmail.com> wrote:
> three years on, and i am encountering the same issue when using
> auto-complete on a new document:
> ActionController::RoutingError (No route matches
> "/thiss/complete_user_name")
> any resolution? ~daVe
> On Thursday, May 21, 2009 4:29:19 PM UTC-7, Montgomery Kosma wrote:
>> Thanks to everyone for all the help, things are moving ahead much more
>> smoothly for me this evening.
>> Already dipping its toes in the production environment, the team as
>> now defined 217 employees in the app. The oddity is that I'm getting
>> precisely 101 options in an employee select (generated by a belongs-to
>> association). In the html, there's one <option value=""> for "None"
>> followed by <option value=... for the first 100 employees, in alpha
>> order as required by my set_default_order tag.
>> Now, it looks like the SQL being generated to populate the drop-down
>> is the culprit, as my console window shows:
>> SELECT * FROM 'employees' LIMIT 100
>> Where's this 100 coming from -- hobo? rails? More important, how do I
>> work around it?
> --
> 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/-/3BzO9GWAlNcJ.
> To post to this group, send email to hobousers@googlegroups.com.
> To unsubscribe from this group, send email to
> hobousers+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/hobousers?hl=en.
fields do
# name :string, :required #, :login => true
first_name :string, :required
last_name :string, :required
email_address :email_address, :unique, :login => true, :case_sensitive
=> false
administrator :boolean, :default => false
timestamps
end
...
def name
first_name.to_s + ' ' + last_name.to_s
end
# necessary for autocomplete where user has similar or same name as
another
# and thus uniqueness of user determined by email address
def name_with_email_address
first_name.to_s + ' ' + last_name.to_s + ' (' + email_address.to_s +
')'
end
# allow autocomplete to find by name when name is a generated field (see
above)
def self.find_by_name(name)
names = name.split(' ')
(0..(names.length-2)).inject(nil) do |result, n|
result ||= self.find_by_first_name_and_last_name(names[0..n].join('
'), names[1..(n+1)].join(' '))
end
end
...
# default sort EVERYWHERE!
default_scope :order => 'last_name, first_name'
# --- Associations --- #
has_many :assignments
...
end
perusing this group, i continue to see this same issue pop up, so any
insight is much appreciated! ~daVe
On Thu, Jun 7, 2012 at 11:37 AM, Bryan Larsen <br...@larsen.st> wrote:
> Montgomery's email was about a problem with select-one. The "limit"
> attribute has existed on select-one for quite some time now to fix his
> problem.
> Your problem is with name-one. It appears that you need to explicitly
> specify the complete-target attribute. If you provide more context I
> can probably help you further.
> Bryan
> On Thu, Jun 7, 2012 at 1:09 PM, d@Ve <kungfuk...@gmail.com> wrote:
> > three years on, and i am encountering the same issue when using
> > auto-complete on a new document:
> > ActionController::RoutingError (No route matches
> > "/thiss/complete_user_name")
> > any resolution? ~daVe
> > On Thursday, May 21, 2009 4:29:19 PM UTC-7, Montgomery Kosma wrote:
> >> Thanks to everyone for all the help, things are moving ahead much more
> >> smoothly for me this evening.
> >> Already dipping its toes in the production environment, the team as
> >> now defined 217 employees in the app. The oddity is that I'm getting
> >> precisely 101 options in an employee select (generated by a belongs-to
> >> association). In the html, there's one <option value=""> for "None"
> >> followed by <option value=... for the first 100 employees, in alpha
> >> order as required by my set_default_order tag.
> >> Now, it looks like the SQL being generated to populate the drop-down
> >> is the culprit, as my console window shows:
> >> SELECT * FROM 'employees' LIMIT 100
> >> Where's this 100 coming from -- hobo? rails? More important, how do I
> >> work around it?
> > --
> > 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/-/3BzO9GWAlNcJ.
> > To post to this group, send email to hobousers@googlegroups.com.
> > To unsubscribe from this group, send email to
> > hobousers+unsubscribe@googlegroups.com.
> > For more options, visit this group at
> > http://groups.google.com/group/hobousers?hl=en.
> --
> You received this message because you are subscribed to the Google Groups
> "Hobo Users" group.
> To post to this group, send email to hobousers@googlegroups.com.
> To unsubscribe from this group, send email to
> hobousers+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/hobousers?hl=en.
> # necessary for autocomplete where user has similar or same name as
> another
> # and thus uniqueness of user determined by email address
> def name_with_email_address
> first_name.to_s + ' ' + last_name.to_s + ' (' + email_address.to_s +
> ')'
> end
> # allow autocomplete to find by name when name is a generated field (see
> above)
> def self.find_by_name(name)
> names = name.split(' ')
> (0..(names.length-2)).inject(nil) do |result, n|
> result ||= self.find_by_first_name_and_last_name(names[0..n].join('
> '), names[1..(n+1)].join(' '))
> end
> end
> ...
> # default sort EVERYWHERE!
> default_scope :order => 'last_name, first_name'
> perusing this group, i continue to see this same issue pop up, so any
> insight is much appreciated! ~daVe
> On Thu, Jun 7, 2012 at 11:37 AM, Bryan Larsen <br...@larsen.st> wrote:
>> Montgomery's email was about a problem with select-one. The "limit"
>> attribute has existed on select-one for quite some time now to fix his
>> problem.
>> Your problem is with name-one. It appears that you need to explicitly
>> specify the complete-target attribute. If you provide more context I
>> can probably help you further.
>> Bryan
>> On Thu, Jun 7, 2012 at 1:09 PM, d@Ve <kungfuk...@gmail.com> wrote:
>> > three years on, and i am encountering the same issue when using
>> > auto-complete on a new document:
>> > ActionController::RoutingError (No route matches
>> > "/thiss/complete_user_name")
>> > any resolution? ~daVe
>> > On Thursday, May 21, 2009 4:29:19 PM UTC-7, Montgomery Kosma wrote:
>> >> Thanks to everyone for all the help, things are moving ahead much more
>> >> smoothly for me this evening.
>> >> Already dipping its toes in the production environment, the team as
>> >> now defined 217 employees in the app. The oddity is that I'm getting
>> >> precisely 101 options in an employee select (generated by a belongs-to
>> >> association). In the html, there's one <option value=""> for "None"
>> >> followed by <option value=... for the first 100 employees, in alpha
>> >> order as required by my set_default_order tag.
>> >> Now, it looks like the SQL being generated to populate the drop-down
>> >> is the culprit, as my console window shows:
>> >> SELECT * FROM 'employees' LIMIT 100
>> >> Where's this 100 coming from -- hobo? rails? More important, how do I
>> >> work around it?
>> > --
>> > 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/-/3BzO9GWAlNcJ.
>> > To post to this group, send email to hobousers@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > hobousers+unsubscribe@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/hobousers?hl=en.
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Hobo Users" group.
>> To post to this group, send email to hobousers@googlegroups.com.
>> To unsubscribe from this group, send email to
>> hobousers+unsubscribe@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/hobousers?hl=en.
> --
> You received this message because you are subscribed to the Google Groups
> "Hobo Users" group.
> To post to this group, send email to hobousers@googlegroups.com.
> To unsubscribe from this group, send email to
> hobousers+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/hobousers?hl=en.
btw, we are on hobo 1.3, anticipating the 1.4 release. we've started investigating 1.4 but have run into quite a few upgrade path issues: will this be one of them, or will our legacy <name-one> calls remain operational as-is?
name-one and several of the other more complex widgets were built on
top of script.aculo.us. One of the major goals of 1.4 was getting rid
of prototype.js & script.aculo.us, so this necessarily means that the
javascript for many of these widgets has changed substantially.
In many cases this is an improvement because jQuery & jQuery-UI are
much better maintained, but I'm sure that I will have introduced new
bugs in the rewrite. The earlier you try the beta the earlier we can
fix any bugs that affect you. :)
In this case it probably wouldn't have mattered whether you were using
1.3 and 1.4, the code causing your issue is in DRYML and is the same
in both versions. I haven't dug deep enough to figure out whether
your issue is a bug in code or in documentation. Please open a
lighthouse ticket referencing this thread.
On Thu, Jun 7, 2012 at 4:55 PM, d@Ve <kungfuk...@gmail.com> wrote:
> doh! that was it, bryan. thanks much:)
> btw, we are on hobo 1.3, anticipating the 1.4 release. we've started
> investigating 1.4 but have run into quite a few upgrade path issues: will
> this be one of them, or will our legacy <name-one> calls remain operational
> as-is?
> On Thursday, June 7, 2012 1:40:38 PM UTC-7, Bryan Larsen wrote:
>> Have you tried using complete-target="&Assignment"? on the new page,
>> @assignment doesn't have an id.
>> Are you using Hobo 1.3 or Hobo 1.4? The javascript for name-one is
>> completely different in 1.4.
> To post to this group, send email to hobousers@googlegroups.com.
> To unsubscribe from this group, send email to
> hobousers+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/hobousers?hl=en.