similar to: Route and patterns

Displaying 20 results from an estimated 800 matches similar to: "Route and patterns"

2007 Dec 11
4
Lost in translation - Rails 2.0 Nested Resources, Custom Actions
The shift to the :has_many and :has_one options when defining nested resource routes has me perplexed. The block format allows me to define custom REST actions like publish in the example below: map.resources :users do |user| user.resources :articles, :member => { :publish => :put } end It also allows for multiple levels of nesting if necessary. What I''d really like to
2006 May 31
1
Automatic .santize?
Hello and thanks in advance to those who post back, I''m working on a calender but, it renders the data in the controller then saves it as @code so I call it in the veiw <%= @code %>. So everythings working and I add this line.. @event = Event.find_by_date("#{@temp13.year}-#{@temp13.month}-#{@temp13.day}") if @event == nil @@td = "<td width=50 height=50
2006 Jun 18
5
User/Password Management: Mapping items to inidividual users
Is there a good plugin that does per page authentication management? For example, I want to allow users to create pages and share them with specific users, all users, or none at all on a per page basis. Benjamin -- Posted via http://www.ruby-forum.com/.
2011 Sep 20
1
About using Dovecot indexes with Thunderbird/kmail
I have Dovecot running well on my Mandriva mail hub, handing out IMAP to the household LAN. This is 1.2.15. Eventually I'll upgrade the OS and get 2.x, but this is working fine. So this question is really about the mail readers I use and how they make use of Dovecot. I have Thunderbird on my laptop and KMail2 on my desktop. Dovecot indexes. GOOD! The trouble is that the mail readers
2002 Mar 01
1
using samba instead of NFS?
Sorry if this is a dumb question.... Is it possible to use samba instead of NFS to allow users home directories to be on a server. (I have a windows network with samba as the domain controller, but also have some machines which can boot into linux, and I want interested users to have the same home directory as they would if they had logged on via windows and samba) Something I read implied
2007 Dec 10
7
Serious Geek RoR newbie: wishes to know EXACTLY what/where all is installed by packages. Tnx!
[TOP lINE: is there a linux program that will tell me where all the installed files went?] Hi all....great to be here... i''m pretty relentless yet very new to RoR and fairly new to Linux [went with ubuntu 7.10 for the time being - learing pure Deb and/or Slack/BDS for the future] anyhooo.. So... Coming from my highly understood XP install [frankly it feels yuk these days] i''m
2006 Apr 28
1
Redcloth is ..
I've been looking at Dean Allen's Redcloth, which claims to incorporate both Markdown and Textile, as implemented in Ruby by _why. While the code is clear and readable, the boundary between markdown and Textile is not. The documentation says # By default, Redcloth uses both Textile and Markdown formatting, with # Textile formatting taking precedence. If you want to turn off Markdown #
2006 May 02
1
Macros?
Is there any way to do macros in Markdown? Or do you have any other suggestions? I'm thinking of a few uses. One is to read back system stuff that might be global or session settings. Example Tell the user where they are coming from, time etc You are %%USERNAME%% Logged in at %%LOGINTIME%% Your browser is %%HTTP{"User-Agent"}%% You are accessing from
2008 Feb 05
1
K Means Clustering Weighted by Frequency
*Apologies if this is not the right way to ask a question, I'm a first timer posting here. Does anyone have a solution to this? I'm having trouble figuring out how to use weighting with K Means Clustering. So say if my dataset is: Column 1 = x coords Column 2 = y coords Column 3 = frequency each coordinate occurs So I'm basically trying to weight the points more heavily if
2006 Apr 28
6
Emphasis or Italic?
What's the difference between: <em>emphasis</em> and <i>italicized</i> and <strong>strong</strong> and <b>bold</b> It seems to subtle for my browsers. The only "difference" I've been able to find is that according to the O'Reilly book <strong> and <emphasis> are semantic tags, while <b> and <i>
2015 Oct 28
2
Dovecot, JavaMail, UIDs and Message Numbers
Hi, new to this list, so a little prelude to my issue with Dovecot. We have been using JavaMail against Cyrus for ages, and developed Webtop, a huge Java web collaboration application running on them in production in various installations for all this time. Recently we had to run the same software against Dovecot pre-existing accounts running on Nethesis NethServer solution. After some time of
2008 Jun 07
3
DRY validates_format_of?
In a model I have following validates_format_of. Is there an easy way to DRY this up? It seems to be rather repetitive. validates_format_of :expiration_date, :with => /^[0-9]{4}[-][0-9]{2}[-][0-9]{2}$/ validates_format_of :activation_date, :with => /^[0-9]{4}[-][0-9]{2}[-][0-9]{2}$/ validates_format_of :some_other_date, :with =>
2006 Apr 18
10
Validates_ip_of
Hello all After being told of a funky date validator I will ask again for another validator :) Does anyone know of a plugin that validates that a field is the correct syntax for an IP Address? Thanks Jeff -- Posted via http://www.ruby-forum.com/.
2005 Nov 28
4
validates_format_of nil
I''ve noticed that validates_format_of will return invalid if the field is nil. Question 1) How should we declare a validation that will validate it with a regex if it is set, but, if the field is not set, just move on Question 2) Why is it done this way? The other validators are only invoked if the field is set . If you want to declare the field mandatory, you add a
2006 Apr 05
4
validates_format_of ?
Hi all, I''ve got a form which accepts a "price" field and I''m attempting to validate it and allow some flexibility in the way the user enters it. It''s a numeric field but I want the user to be able to enter dollar signs and commas naturally in the data entry. I''m trying to understand how to use validates_format_of, and I''m not sure what
2006 May 10
8
E-mail validtor??
Does anyone have a good working e-mail validator? or even some regexp to make the validates_format_of work right... that would be awesome. Also, maybe an online tutorial for regexp. i''ve always been afraid of it but i think it''s time to face the fears. thanks! -- Posted via http://www.ruby-forum.com/.
2012 Aug 14
3
validates_format_of :message not working, validates_length_of :message is working
I''m using validates_format_of and the validation I want to do works, but I can''t get an error message to be displayed if the data is invalid: validates_format_of :mobile, :with => /\A[\+0-9]+\Z/, :message => " - Wrong" I have another validation some where else that does display the error message: " - Name is too long" validates_length_of :name,
2006 Jan 19
4
validates_presence_of
I am just going through the book and I come across a problem with the code in the app/models: validates_format_of :image_url, :with => %r{^http:.+\.(gif|jpg|png)$}i, :message => "must be a URL for a GIF, JPG, or PNG image" It seems to moan when it''s empty even though I removed :image_url from validates_presence_of. How should I make it optional?
2008 Feb 24
1
validates_format_of no dots allowed
I need a validates_format_of that disallow dots. In the api there is nothing to find about how validates_format_of exatly works. Is there a better documentation or is there something that can tell me howto disallow dots. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups
2006 Feb 08
1
xapian-tcpsrv very slow
Hi, I have been looking at xapian for a project and have so far been very impressed. I have hit one major problem the final architecture requires that the web server be a deferent machine from the server that xapian is installed on. With my test code using local database ($db_path = "/var/xapain_db/default"; $db = new_database($db_path);) a query takes around 0.012 seconds on