similar to: scoped databases need explanation...

Displaying 20 results from an estimated 100 matches similar to: "scoped databases need explanation..."

2006 Jan 25
6
Displaying based on hostname/subdomain
Ive tried multiple ideas to get this to work, but keep hitting a dead end. Has anyone done this before? I want joe.domain.com to display www.domain.com/profile/joe Im using lighttpd. Routes dont have access to the URL string and therefore I cant code in a conditional. lighttpd rewrite seems to really screw it all up. Is there a feasible solution? Thank you, Joe Noon
2007 Oct 26
3
Specing with Subdomains as Account Keys
How do you go about implementing and rspecing subdomains as account keys? I''m sure that this must be an issues for others as well. So I have an app using subdomains as account keys. The Application Controller sets up @current_company in a before filter. Everything is done within the context of the @current_company. After reading about Demeter''s Revenge
2006 Jul 09
0
account_location couple of questions.
Hi I''m having a look at the account_location plugin for a project and there''s a couple of things i''m not sure on. One is what the default_account_subdomain method does. def default_account_subdomain @account.username if @account && @account.respond_to?(:username) end What is this used for? Can anyone provide an example of it''s usage please?
2006 Apr 04
2
Foreign keys not showing!
I''m new at this so please be patient. I have a very simple schema consisting of a around 10 tables in Postgresql. The aim is to provide a system for PC administrators to keep track of PC''s dotted around various venues (shops, libraries etc.). The sort of info I want to store is PC specs, PC network specs, PC ownership specs, PC location specs and contact person details. So I end
2006 Apr 25
4
belongs_to :through
belongs_to :through Why is that not possible? We should have: Street belongs_to :city belongs_to :country, :through => :city -- Posted via http://www.ruby-forum.com/.
2005 Dec 27
3
Trouble combining :has_many, :finder_sql and :conditions to create a sub-search
I''m sure there''s something right under my nose that I''m missing. I have two tables with two parallel one-to-many relationships. I wish to use the :finder_sql parameter to essentially ''or'' the two foreign keys. What isn''t working for me is performing a ''sub-search''. Let''s say the tables are "stores" and
2005 Nov 28
1
has_one / HABTM relationship overlap - please advise
1. I have a few tables: ''users'', ''shops'', ''addresses'', and ''pictures''. 2. Users and Shops will both use the addresses and pictures tables. I have created several mapping tables: addresses_shops pictures_shops addresses_users pictures_users 3. Users CAN have many addresses and pictures (simple HABTM), but... 4.
2006 Mar 04
1
active migration gives undefined_method ''string_to_binary''
has anyone ever seen that: c:\rails\test>rake migrate --trace (in c:/rails/test) ** Invoke migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute migrate rake aborted! undefined method `string_to_binary'' for ActiveRecord::ConnectionAdapters::ColumnDefinition:Class
2007 May 03
2
Multiple Update Actions that are Relatively the same
Hi there, I have 2 actions that are rather identical: # Put /account/you/update_password def update_password @user = current :user respond_to do |format| if @user.update_attributes(params[:user]) format.html {redirect_to account_url} else format.html {render :action => "edit_password"} end end end # PUT /account/you # Update
2004 Apr 22
0
internal error occurs while domain users try to access file servers
Hello experts, I have installed Samba3.0.1 for "Account Domain Controller(PDC)" and openLDAP2.2.6 for backend database which stores user accounts. There is Windows2000 Server for "Resource Domain controller" that has a trust relationship with Samba "Account Domain Controller". WINS service is running on "Resource Domain Controller" Windows2000 Server
2006 Feb 06
4
Relationship Question (STI)
My girlfriend and I have been dating for two years, and she just told me she has an STI... Actually, I currently have three different models, like: Dog, Whale, Monkey They all have some similar attributes, but, they are unique enough to break into their own models. I could use STI, but I think the table would just have too many columns. Now, I wanted to let the Dog''s, Whale''s
2008 Dec 16
20
step definitons to check login
I am working with the authlogic gem and trying to create a simple login test from cucumber features. The feature statement is: Given the user is not logged in The step definition for this is confounding me. In the application_controller the authlogic tutorial recommends the following: private def require_user unless current_user store_location flash[:notice] =
2007 Jan 24
0
Mocha 0.4 released
So I finally got round to releasing a new version<http://rubyforge.org/frs/?group_id=1917&release_id=9184>of Mocha <http://mocha.rubyforge.org/>. Much of the functionality has been available for some time if you''ve been using the Rails plugin based on subversion HEAD, but now you can get it in all in a gem (or other package). The most recent changes centre around allowing
2006 Feb 24
1
store rhtml in database
Has anyone done this? I want to store the rhtml (template) in the database, but not sure how I can code the controller to generate the file html and send it to the user. -- Posted via http://www.ruby-forum.com/.
2009 Jan 16
16
Testing arbitrary post action parameters
I am working on our (newly renamed) authentication feature. The current scenario is: Scenario: Non-administrators should not set administrator ability Given I have no users And I add a user named "admin" as an administrator And I add a user named "myuser" as not an administrator When the user named "myuser" authenticates And the user
2006 Jul 15
1
Relationship problem, newbie problem, need help!!
Hey all I seem to be having some problems with my relationship between a few tables... If i then run the following query in mysql, i get the data i want. How do i do this in rails relationships and models? select * from shop_addresses left join shops on shops.id = shop_addresses.shop_id left join styles on styles.id = shops.style_id where shop_uri = ''127.0.0.1'' Cheers!!
2006 Jul 06
0
session scoped controllers
I was wondering if the notion of session scoped controllers has ever been discussed? The idea is that you could do something like this: def MyController < ActionController::SessionBase def step1 @favorite_color = params[:color] end def step2 # when step2 is hit by the user # @favorite_color would auto-magically be here puts "favorite color is
2006 Feb 13
1
acts_as_taggable scoped in another class/table?
I''m hoping someone more familiar with DHH''s acts_as_taggable plugin can help me out here... Tags being all the rage, and the subject of a good recipe in the forthcoming Pragmatic Rails Recipes book, I decided to give them a try. However, from what I can tell, they''re kind of application-wide by design. I know the social thing is hot, but I need my tags to be
2012 Apr 13
0
Scoped attr_accessible not working?
Please refer to the ActiveModel MassAssignmentSecurity api<http://api.rubyonrails.org/classes/ActiveModel/MassAssignmentSecurity/ClassMethods.html>for this. I''m on Rails3.2.3/Ruby1.9.3 and trying to use that technique in the controller as described. It is supposed to dynamically restrict the attributes that can be mass assigned. However, sanitize_for_mass_assignment is ignoring
2010 Mar 23
0
ActsAsTaggableOn scoped to Account
Hi, Can anybody give me some clues how to use ActsAsTaggableOn in an Account scoped way? ie. I want several accounts each to have their own sets of tags to tag their own articles rather than sharing a giant pool of tags. Or perhaps there is a better solution than ActsAsTaggableOn? Thanks! -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: