search for: shops

Displaying 20 results from an estimated 2304 matches for "shops".

Did you mean: ships
2009 Mar 25
11
ActiveRecord: Nested :include erroneous behavior
...2.0. This example illustrates the usage of nested :include finder options. class Book < ActiveRecord::Base has_many :distributors end class Distributor < ActiveRecord::Base belongs_to :book has_many :agents end class Agent < ActiveRecord::Base belongs_to :distributor has_many :shops end class Shop < ActiveRecord::Base belongs_to :agent end Schema - http://pastie.org/426261 def test_should_load_avatars shop_1= Shop.create! shop_2= Shop.create! book= Book.create!(:distributors => [Distributor.create!(:agents=> [Agent.create!(:shops => [shop_2, shop_2])])])...
2012 Aug 17
3
Rails doesn't validate create_model or build_model (has_one association)
...Shop. Rails is not validating when I tried create_shop or build_shop, neither in the browser nor the rails console. My code: class Shop < ActiveRecord::Base attr_protected :user_id belongs_to :user validates_presence_of :name, :primary_address, :city, :country_code, :currency end class ShopsController < ApplicationController before_filter :signed_in_user, except: [:index, :show] before_filter :correct_user, only: [:edit, :update, :currency, :update_currency] def new @shop = Shop.new end def create @shop = current_user.build_shop(params[:shop]) if @shop.save...
2006 Feb 07
3
help with relationship
Let''s imagine we are modelling a company that have several shops. I have a Worker model and a Shop model. A worker belongs_to a shop, and each shop has_many workers. But, in a shop there''s a distinguished worker that is the supervisor create table shops ( ... worker_id integer -- the supervisor ); How would you expres...
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 (sim...
2012 Apr 27
4
Is my developer dodgy?
Hi! I need some help, my partner and I have hired an app development company to create an iPhone app that allows shops to list their inventory and advertise their specials, there is also a back end admin website that shop owners can login to that allows them to update their inventory and specials. The admin website communicates directly with the iPhone app so that any changes made are shown on the app, pretty much...
2011 Sep 01
0
do you think it's the best solution?
I have: class Shop < ActiveRecord::Base has_many :documents, :dependent => :restrict has_many :roles, :dependent => :restrict accepts_nested_attributes_for :documents accepts_nested_attributes_for :roles the shop _form is: = simple_form_for(@shop) do |shop_f| = render ''shared/error_messages'', :object => @shop = render :partial =>
2011 Sep 15
1
bypass defualt scope.
class Shop < ActiveRecord::Base has_many :documents, :dependent => :restrict end class Document < ActiveRecord::Base belongs_to :shop default_scope :order => ''updated_at DESC'' end in the Shop show view I have: - for document in @shop.documents %li(id="shop_documents")= link_to document.subject, shop_document_url(@shop, document) I want list
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 up with a few tables associated with one another through foreign keys and join tables. Two of the tables, for example, are created with (nodes...
2012 Oct 16
2
unique
Hello everybody, I've got a problem concerning the function unique. I have got a data.frame "shopdata" with 1000 shop which were evaluated at different points in time. With function subset I chose those shops with more then 10 employee and store it in data.frame "bigshopdata" with 700 shops. bigshopdata=subset(shopdata, shopdata$employee>10) Now I use unique(bigshopdata$name) to ensure that each shop name is only listed ones and not two or three times because of an evaluation at diff...
2006 Feb 18
3
scoped databases need explanation...
Could someone explain this http://blog.leetsoft.com/articles/2005/10/31/scoped-databases in a way that can be understood with an example if possible. Tobi Lutke has started to explain but it does not make any sense. "Since rails 0.13.1 we support calling class methods over associations." what?? give an example. also "The Shop object is figured out at the beginning of each
2006 Jun 22
4
Shop plugin?
I hope I''m not completely off-base here but is there a shop plugin for ruby/rails that means I don''t have to write the code for a shop from scratch? Can''t seem to find one... Thanks! Bex -- Posted via http://www.ruby-forum.com/.
2009 Jan 29
1
Problem compiling 3.3.0?
On RH 5.2, and I've previously compiled and installed 3.0.28a on this box. configure ran clean, but make fails with:- Compiling smbd/server.c Linking bin/smbd smbd/server.o: In function `housekeeping_fn': server.c:(.text+0x21e): undefined reference to `attempt_machine_password_change' collect2: ld returned 1 exit status make: *** [bin/smbd] Error 1 Anyone else encountered this?
2011 Jul 14
1
RoutingError with RSpec Controller test on Scoped Route
So I have a route that looks like this: scope "4" do scope "public" do scope ":apikey" do resources :shops end end end And a bunch of controller specs, an example of which looks like this: describe ShopsController do describe "when responding to a GET" do context "#new" do it "should create a new instance of the shop class" do get :new...
2013 Nov 15
0
gpo not working
Hello people: First, excuse any misspelling, english is not my mother tongue I'm triying a simple gpo, put a fixed image as wallpaper on all the pc connected to the dc but is not working. Using the remote administration tool had has defined an Organizational Unit with one user and defined a policy with two restrictions 1) use a shared image [ \\dc\common\backgroud.jpg ] as wallpaper 2)
2010 Jan 20
0
How to map a Named Route onto a namespaced resource?
I have a site, where I am currently adding a self-built shop. Among other stuff I have this construction in my route-file map.namespace :shop do |shop| shop.resources :categories do |categories| categories.resources :products end end I like the namespace, since it encapsulates the shop nicely inside my webapplication. Somehow I would like the url "http://mysite.com/shop" to
2008 Jan 10
1
data.frame manipulation: Unbinding strings in a row
...4 But I would like to unbind the strings in col(2) items so that it will look like this: ID Shop Items ID1 A1 item1 ID1 A1 item2 ID1 A1 item3 ID2 A2 item4 ID2 A2 item5 ID3 A1 item1 ID3 A1 item3 ID3 A1 item4 Meaning each item is on a different row but still maintain the ties with the IDs and the Shops. The final purpose is to count how many times a particular item has been bought in a particular shop, like: item1-A1= 2 item2-A1=1 item3-A1=2 Any ideas? Thanks -- View this message in context: http://www.nabble.com/data.frame-manipulation%3A-Unbinding-strings-in-a-row-tp14731173p14731173.htm...
2006 Mar 07
4
should a AR object be able to see backwards?
I have two models, Stop and Station, they relate one station to many stops. Stop has_one :station Station belongs_to :stop So I can do @station.stops, but I cant do @stop.station, is this right? For example in the view I have: <% for @stop in @stops %> <tr> <td><%= @stop.station.name %></td> <td><%= @stop.time.hour.to_s + '':''
2007 Aug 17
1
Need volunteers for new Rails based shopping cart
We''re currently looking for volunteers on the new RailsCart[1] project. The idea is to build something relatively simple with all of the features that most open source shopping carts seem to be missing. We''ll be using ActiveMerchant for all of our payment gateway needs. We''re not trying to build the ultimate shopping cart. This is designed for Rails developers who need
2006 Mar 07
11
maintaining application state/urls
Hi All Not specifically a scriptaculous question, but I was wondering how people were going about maintaining access to their applications via standard urls. Say for example I''ve a shop at www.shop.com, and its pure ajax to load in products. Now customer A wants to show a friend a product on the site - giving him the url www.shop.com and telling him to click on a series of links
2008 Jun 16
3
Apache rewrites with mongrel
I?m knew to rewrites on apache in combination with mongrelcluster. It?s urgend for me, because the server has an loadaverage about 10 :-((((( Ok so I?m using 3 mongrel-server on an mongrelcluster. The Loadbalancer ist apache I think, that my rewrites are not correct. Please can anybody check my rewrites ? That?s in my /etc/apache2/conf.d/rails.proxy_cluster.conf <Proxy