Displaying 20 results from an estimated 10000 matches similar to: "Domain Requirements in Routes (Edge Rails)"
2006 May 18
4
Request Routing Plugin ( :requirements => { :subdomain => ''thing'' } finally works)
Hi All,
Just a quick note to say that I''ve released an intial version of the
request routing plugin which essentially allows you to use various
request object properties as requirements in routes. Most notably you
can do:
map.connect "thing", :controller => ''main'', :requirements => {
:subdomain => ''whatever'' }
..just like the wiki
2006 Apr 04
1
subdomain routing
According to the wiki (http://wiki.rubyonrails.org/rails/pages/Routes)
you can handle subdomain routing in routes.rb. Like this:
with_options :requirements=>{:subdomain=>''first.com''} do
map.connect '''', :controller => "first/catalog"
map.connect ''featured'', :controller => "first/catalog",
2007 Jan 16
4
Subdomain Account Keys Best Practice
Hi all,
I''m thinking of useing sub-domains as account keys, something I''ve played
with previously.
I have accounts and users, fairly standard, except that users can belong to
many accounts, and accounts can have many users.
So I figure I need to have an area on the main domain, that allows users to
view their account memberships and things. Sort of like a dashboard for
each
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 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 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 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.
2006 Jan 12
3
Introspecting Active Record Associations
Hi,
I''m looking into write scaffold generators that will, amoung other
things, scaffold active record associations (eg. generate select
boxes for belongs_to where you can choose a parent object) for quicker
prototyping. But...
My question is: Is there anyway of finding out what associations
exist from examining the lodel classes themselves or indeed any other
way of finding out this
2006 Jun 21
4
Simple Subdomain Routing
Hey all,
I hope this is a relitively simple question, but I have not been able to
arrive at a workable solution for myself.
What I''m wanting to do is a very simple pattern match on a subdomain:
www.* forwards to mydomain.com/www_controller
and everything else forwards to mydomain.com/other_controller
The idea is to forward logged in users to username.mydomain.com, but all
the
2005 Nov 28
5
Rails on lighttpd through proxy
Hi All,
We have a PHP site running on apache 1.3 and Im trying to graft typo
onto it at /blog/. Ive got the running using the symlink method but
apache/fastcgi are clunky to say the least so I want to move typo over
to lighttpd. Ive got this all working and Im now trying to get a
proxy working through from apache. Im using this:
RewriteRule ^/blog/?(.*)$ http://blog.myorg.net:8080/$1 [P]
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
1
Rails is the devil on your client-side shoulder
Hi Everyone,
Sorry for the inflamatory title, just trying to get your attention.
Ive been thinking alot about the JavaScript helpers and I''ve written
my thoughts on my companies blog if any of you are interested:
http://www.vivabit.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
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
2006 Mar 19
38
Macbook for Rails Development
Hi All,
I''ve finally got fed up of struggling with Windows and am on the verge
of splashing out on a Macbook for Ruby/Rails development. 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
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 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
2007 Mar 31
1
Subdomains, Routing, and Subdirectory Controllers
For reference, this question is similar to "Subdomains, Session Data,
& Routing" posted Oct. 31, 2006. Link:
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/d3c5072c3588a1e0/f87d0fdfded31650
----
I would like to set up a subdomain and, using the request_routing
plugin, have requests to that subdomain call corresponding "sub-
controllers" inside a
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
-