search for: _kevin

Displaying 20 results from an estimated 359 matches for "_kevin".

Did you mean: kevin
2006 Jan 22
6
Destructive behavior with link_to, button_to, :post=>true
Hello- I would like to know what the suggested practice is for having multiple submit buttons on a relatively complicated input page. Let''s use the example of a Contact. There is lots of info there, including name, address, phone number. There is also a list of "contact associations" which can be modified on the same page. Ideally, the user could have one
2006 Sep 27
3
uninitialized constant problem
I have two models in the modesl directory, say ABC.rb and DEF.rb ABC.rb: class AbcClass < ActiveRecord::Base ...... hello = Hash.new() hello = DefClass.new #<---here is the error occur ...... DEF.rb: class DefClass < ActiveRecord::Base ...... .... Do I missing anything important to create the instance?? Thanks -- Posted via http://www.ruby-forum.com/.
2006 May 26
5
scriptaculous - auto complete textbox with a drop down
Hi, I''m using scriptaculous to provide an auto complete textbox - and it works perfectly - but I was wondering if there was anyway to let users navigate the choices using the keyboard i.e the curor keys as opposed to having to use the mouse? Apart from that it''s perfect! :) Cheers, Pete -- Posted via http://www.ruby-forum.com/.
2006 May 22
15
collection_select default selected value
Hiall, Unfortunately I just can''t find out how to setup a default selected value when using collection_select. My call is like so: <%= collection_select(:consultant, :lastname, @consultants, :id, :lastname, { :selected => @current_consultant.id } ) %> which is not working, I debugged so far that I know that @current_consultant.id contains the correct value. Any tips? cheers
2006 Aug 02
5
Fun with ez_where
...ble_prefix: table. test: :[] value: :filter and otherwise doesn''t behave as you might expect. Sooo... if want to use the ez_where plugin with conditions, be careful. There''s probably a way around this, hopefully Ezra has some nifty trick for making this work as expected. _Kevin www.sciwerks.com -- Posted with http://DevLists.com. Sign up and save your mailbox.
2006 Jun 04
5
Embedding link_to''s within text fetched from database.
Hi, I have the following problem that I can''t seem to figure out. I want to able to fetch some text from my database record in my controller, and then add two links within the text and then send that back to the view to get rendered so that the two links appear as links and when clicked on, they''d basically call the corresponding action for the link. Would anybody know how to
2006 Apr 27
5
def list - paginate question
How do I adapt this code to only list articles made by the user logged into the session? def list @article_pages, @article = paginate :articles, :per_page => 10 end -- Posted via http://www.ruby-forum.com/.
2006 Jun 19
10
text_field_with_auto_complete doesn|t work in edit/show view
Hi, I am using the autocomplete for text field with ''Scriptaculous'' and it works perfectly fine in "new" action. All the examples I see are only for the "new" action. But doesn''t default to the selected value/text in "edit/show" action? Is this possible or should I write custom code for "edit/show" action? Thanks, Hari --
2006 Apr 05
23
how to create RJS visual effects callbacks
I''m trying desperately to get visuall effects callbacks working in rjs templates to no avail What I''m trying to do is fade an image, change the div with the image to a new image, and then fade the new image back in. How would I go about this in RJS Here''s a simple line from my rjs that I can''t get to work. It is not using callbacks so the
2006 Jan 12
4
Typecasting and boolean attributes
I have 2 radio buttons like this: <%= radio_button ''group'', ''public'', true %> <%= radio_button ''group'', ''public'', false %> They hold the correct values when viewing the @group object. However, when updating, it does not appear that the params[:group][:public] value is being typecast correctly. As
2006 Jan 20
13
Calendar date picker for use with rails.
Howdy folks, As I was putting together a rough form for a rails app, I got to thinking how much smoother (in my siytuation) a little calendar widget would be than the default date picker selects. Does anyone know if such a thing exists ? I suspect it would have to be somewhat designed with rails in mind to populate the right kind of post params for convenient use at the controller end.
2006 Jun 21
7
acts_as_taggable and paginate?
Hi there, I''ve been trying to paginate over a list of members that all share a tag in common using the acts_as_taggable plugin. The regular way of paginating over a collection doesn''t seem to work with acts_as_taggable. Here''s what my method looks like that takes in a tag name, finds all the members that share the tag and then displays all the members. Nothing too fancy
2006 May 04
12
RJSCallback 0.1
...could make your HTML pretty messy. Future versions will hopefully improve the performance a bit and suggestions of how to accomplish this are welcome. Standard disclaimers apply, use at your own risk, may cause rashes if used improperly. It''s also probably full of bugs MIT Licence _Kevin -- Posted with http://DevLists.com. Sign up and save your mailbox.
2006 Jun 18
3
on change of drop down a textfield emerging
hi, i have a situation where i have a list of options from which a user selects his options if its not in the list he/she selects Others/Not Present and a new textfield should pop up and the data entered there should be considered instead of dropdown. i have done this using javascript/dhtml but i was wondering how this can be done using pure rails i.e using some of the RoR apis?. i would
2006 Jan 06
7
how do I create a change password using sha1?
Hello, The problem I am having is I have a form where a user can edit their data that does not include their password. I have another form that I allow them to change their password. Both forms use the before_update method that hashes the password. There is no password in the first form. Am I making this too complicated? How do I call the hash_password for only the second form? Both forms use
2006 Mar 09
4
Testing Migrations
...thout generating a migration for it. The biggest problem with writing unit tests for this is that (AFAIK) there is no simple way to apply migrations to the test database instead of the development one. Is there a simple switch or something in rake that will make it use the test database? _Kevin -- Posted with http://DevLists.com. Sign up and save your time!
2006 Jun 21
5
newbie - question on radio_buttons
I have a view with a form and i want to be able to process the button selected in a controller - not sure how to do this. The form does not map directly to a model - all I want to do is be able to pass back the selected button and know which one it is. So, i have a form and several radio buttons - the submit (not shown) takes me to the process_answer action where I want to determine which
2006 May 16
7
RJS head scratcher
I''ve been joyfully using RJS in a lot of our work lately, with no issues whatsoever. However, I am porting an application to RJS templates that we''ve had for a while, and having some issues. When I use Firebug to see what is going on, the response comes back like this: try { new Effect.Highlight("gi_error_row",{duration:20}); } catch (e) { alert(''RJS
2006 Apr 24
5
Sanitising a Phone Number input
I want to sanitise a phone number input. In my UsersController.rb file I have written a method that will take a string and reduce it to numbers only. This works find if I call it manually, but in the interests of keeping DRY I would like to ensure that the code sanitisation method is called whenever the data is edited (I''m using standard scaffolidng for this test). Is there anyway
2006 Jul 14
3
override to_string for single attribute?
I have a model where I want to change the display for a single attribute such that if the value is an integer, it displays with no decimal point (e.g. "1"), but if it is non-integer, it displays with a decimal point (e.g. "1.25"). The easiest way to do this seems to be if I could override the to_string method for my_model.my_attribute.to_s. Is there a way to do this? Or