search for: danwebb

Displaying 20 results from an estimated 21 matches for "danwebb".

2006 Jun 09
11
Adding routes from plugin
Can anyone tell me how to add routes from plugin? I know it is possible because of this changeset: http://dev.rubyonrails.org/changeset/2967 but i didn''t find way how to do it. retro -- Posted via http://www.ruby-forum.com/.
2006 May 18
4
Request Routing Plugin ( :requirements => { :subdomain => ''thing'' } finally works)
...es several other request methods as well like domain, port, method etc. and excepts Regexps as well as strings for matching. SVN: http://svn.vivabit.net/external/rubylibs/request_routing/ README: http://svn.vivabit.net/external/rubylibs/request_routing/README Cheers, Dan -- Dan Webb http://www.danwebb.net
2006 Jul 21
3
Unobtrusive Javascript plugin
Hi, I downloaded the unobtrusive_javascript pluing from this link (http://www.lukeredpath.co.uk/index.php/2006/06/06/introducing-unobtrusive-javascript-for-rails/) since I needed to have dynamic content in javascript (for a pop-up menu). Unfortunately I have been unable to make the plugin work. I followed the instructions on the website, but for some reason the javascript doesn?t work (for
2006 Mar 26
9
validate_uniqueness_of {combination of fields} ???
I''ve looked at the validates documentation and it appears that validates_uniqueness_of works on only one field at a time. So I can, for example, validate that "sam" is unique to the record set, and that "smith" is unique to the record set. My problem is that each record includes two fields, the _combination_ of which must be unique to the record set, but each of
2006 Jan 12
3
Introspecting Active Record Associations
...lasses themselves or indeed any other way of finding out this information? There''s nothing obvious from looking at the RDOCs and Im poised to delve into the rails source but Id rather not because the association code is pretty meaty. Anyone got any clues? Thanks, -- Dan Webb http://www.danwebb.net
2006 Feb 10
1
Rails is the devil on your client-side shoulder
...vabit.com/bollocks/2006/02/09/rails-is-the-devil-in-your-client-side-shoulder I know people have brought this up a number of times but I really think it needs some attention. Let me know what you think. Im hoping to get a plugin / patch done to take to RailsConf. Cheers, -- Dan Webb http://www.danwebb.net
2006 May 12
7
RJS and page.select collection size
I need to implement a conditional in my RJS template which looks something like: if (page.select(''row1'').first != null) page << "new TableRow.MoveAfter(''row1'', ''newrow'');" else page << "new TableRow.MoveAfter(''row2'', ''newrow'');" end Now, dumb question.. My
2006 Feb 10
7
convert rails object to javascript variables
Am i a total idiot to try and parse out a rails object for javascript in this way? <% for i in interface_items[0].attributes %> var <%= i[0] %> = "<%=h( i[1] )%>" <% end %> Am I missing something really obvious? Thanks, Mark -- -------------------------------------------------------------------- I am Mark Daggett and I approve this message.
2005 Nov 28
5
Rails on lighttpd through proxy
...it easier. Any wisdom on this? Ive ploughed through all the wiki and other articles on the subject but found no solution as yet. Hope someone can help me out, Ive been tearing my hair out over this for days... Thanks in advance for saving what''s left of my hair, -- Dan Webb http://www.danwebb.net
2006 Jul 24
3
Rails and Dojo
Anyone have any positive or negative experiences trying to get Dojo to play nicely with Rails / Prototype / Scriptaculous? Would people recommend it? Recommend against it? Why? Thanks, Brad
2006 Feb 10
1
instance_eval and Proc objects
Hi All, Got a bit of a Ruby question for you. If I have a function that makes a proc object like this: def select(selector, &proc) el = Element.new el.instance_eval proc end select("#thing") do hide end Wat I want to do is evaluate the Proc in the context of el but this doesn''t work because instance_eval accepts a string or a block and not a Proc object. I sense
2007 Dec 06
3
anybody use OPEN_ID to authenticate?
how did it go? here is the link if you are interested: http://openid.net/what/ -- 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
2006 Mar 23
10
Domain Requirements in Routes (Edge Rails)
I saw on the bottom of the following page that you can route requests to different controllers based upon which subdomain is being requested. http://wiki.rubyonrails.com/rails/pages/Routes with_options :requirements=>{:subdomain=>''first.com''} do map.connect '''', :controller => "first/catalog" map.connect ''featured'',
2006 Mar 19
38
Macbook for Rails Development
...evelopment. I''ve seen DHH''s post about it on loudthinking but I wondered if anyone else has any more wisdom... Is it worth it over a powerbook? Any tips on good OSX apps for Rails dev (textmate, i know already)? Anything not working well on it? Thanks, -- Dan Webb http://www.danwebb.net
2006 Mar 05
7
whatever happend to unobtrusive javascript in Rails ?
Don''t get me wrong, JavaScript/Ajax helpers in Rails are a huge timesaver and they have helped me to finally overcome my irrational aversion to js libraries like prototype and such. However, all this goodness seems to come at quiet a price. The resulting code is littered with inline JS, including ubiquitous script tags and onload attributes etc.. It seems that just when i found
2006 Jul 27
9
Introspecting validates_presence_of
Hello people, I''d like to detect whether an attribute of a model has vaildates_presence_of applied to it so I can automatically apply a mandatory (*) to the field...it doesn''t look easy...any ideas? Cheers, -- Dan Webb http://www.danwebb.net
2006 Jul 28
4
Validation Reflection plugin
The validation reflection plugin adds three things (1) Reflective access to validations - ModelClass.reflect_on_all_validations - ModelClass.reflect_on_validations_for(:property) (2) It provides "declarative" methods for defining validations based on database metadata - validates_presence_of_mandatory_content_columns - validates_lengths_of_string_attributes -
2006 Mar 25
1
routes mapping, subdomains and page-caching
Each of its own is no problem, but the combination of them is confusing my head ! I want to to map in routes.rb an url for an article which is identified by its permalink. The permalink is unique per subdomain. Has anybody done that and can post an example ? Should I do subdomain filtering in routes.rb so I can get page-cachabled URLs (and URL rewriting in Lighttpd form subdomain-urls to
2006 Mar 30
4
SSL Requirement plugin
Is there any way to have the plugin require SSL to be used for all actions in a controller and just specify the ones you dont want to require SSL using ssl_allowed? class ApplicationController < ActiveRecord::Base include SslRequirement ssl_required *.* Many thanks. Also I could of course combine this with local.request? so that when developing locally http is allowed, but
2005 Dec 15
6
Dynamic Text Replacement
I noticed there are a lot of PHP based dynamic text replacement examples out there such as: http://artypapers.com/csshelppile/pcdtr/ Is there anything like this for Ruby / Rails? I know there''s always SiFR but that method is often frustrating because I''ve noticed significant slow down in page load time even on pages that use it sparingly.