Displaying 20 results from an estimated 10000 matches similar to: "Getting Involved and Rails 3 Observations"
2011 May 31
1
Geokit query with multiple models involved
Hello,
My database structure consists of Store, Book, BookStore and Address
as below.
class Store < ActiveRecord::Base
has_many :book_stores
has_many :books, :through => :book_stores
has_many :addresses
acts_as_mappable :through => :addresses
end
class Address < ActiveRecord::Base
belongs_to :store
acts_as_mappable
end
class Book < ActiveRecord::Base
has_many
2010 Jun 16
2
class methods from module where active rec is involved
I have a module as shown below and when I extend an active record to
use it, I can not access the
primary_key method. In a simple test program using a similar approach
where active record is not involved, access to the class methods seems
to work ok. What can I do to make this work or so that I can access
the class methods ?
##################################
require
2010 Aug 02
7
Complex associations
I am working on a project that has some complex table associations,
and I am having a hard time declaring this association in a Model, and
fear it can''t be done.
Here is an example of my issue...
class StoreType < ActiveRecord::Base; end
class Store < ActiveRecord::Base; end
class Department < ActiveRecord::Base; end
class Product < ActiveRecord::Base; end
A StoreType has
2011 Aug 26
2
Observer for checkbox
Hi!
I want to put a checkbox on my data list in index view, and change his value
on database when I change the value of this chekbox.
Someone know how is the good way for do it?
Thanks!
--
*Fernando Aureliano*
--
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
2012 Dec 06
2
Bye Bye, Observers
Observers will be no more as of Rails 4, farewell, never been much of a
fan. However, I''m using it in one of my gems which enables model attributes
for use with a WYSIWYM editor. The resulting markup is persisted, but in
order to use it in a view, it has to be nokogiried in a helper which
fragment caches the result. This cache has to be zapped once the model
instance is either
2011 Dec 17
39
Stack Level Too Deep Error (can't seem to figure it out)
Hi all,
I am running into a weird issue where my application is giving me a
stack level too deep error. I can''t seem to find where my code is
throwing this error. On the machine I developed this code on, this
error does not show up when I run rails s but when I move the code to
another system to run it this error shows up.
The system that this code runs fine on is a mac os x machine
2012 Dec 08
9
link_to popup
Hello All,
I have a link. Which I want to open as a new window :-
<%= link_to "Google", "https://www.google.com", :popup =>
[''new_window_name'',''toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes'']
%>
But it is opening in the same page....
Any suggestions how to do it ??
Even hover will be
2012 Jan 11
4
Observe field with jquery in Rails 3.1
I tries to observe a change in a field with jquery in Rails 3.1 in
order to be able to implement two cascading select boxes.
A a first step I just try to observe a click in a div using jquery
I have the following function in a .js file that is loadedin the head
section (fieldset is the id of a div) and is displaying a view with
the div fieldset
$(document).ready(function() {
2010 May 31
1
Flash not deleting with Redis/Memcache store
I''m a recent convert to Rails and I''m working on a new project using Rails 2.3 (I''ll probably upgrade at some point when Rails 3 is in production and had a chance to bake the .0 bugs out). I''m going to use Redis anyway for caching important data, so I thought I''d use the redis-store:
http://github.com/jodosha/redis-store
But it appears the flash
2010 Feb 11
6
Anyone know of a Rails POS (point-of-sale) app?
Open-source or commercial.
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit
2007 Mar 02
2
sampling random groups with all observations in the group
Hi
I have a panel dataset with large number of groups and differing number
of observations for each group. I want to randomly select say, 20% of
the groups or 200 groups, but along with all observations from the
selcted groups (with the corresponding data).
I guess it is possible to generate a random sample from the groups ids
and then match that with the entire dataset to have the intended
2010 Dec 31
2
why observer can't fire in rspec? help .
I read the guide and api and i created Observer on model, she can run
on rails console of test env.
but when i use rspec , the observer can''t run in, it''s never step in.
some good man help me, please. i debug it use one day and one night, i
can''t sleep in today night unless i solve it.
--
You received this message because you are subscribed to the Google Groups
2012 Nov 26
8
why functional test does not get failure?
The test:
test "should get new" do
get :new, :room_id => @room.name
assert_template(:ne)
end
the template new does not exists but the test does not get failure.
Why?
--
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
2012 Nov 29
2
Deleting certain observations (and their imprint?)
I'm manipulating a large dataset and need to eliminate some observations based on specific identifiers. This isn't a problem in and of itself (using which.. or subset..) but an imprint of the deleted observations seem to remain, even though they have 0 observations. This is causing me problems later on. I'll use the dataset warpbreaks to illustrate, I apologize if this isn't in
2010 Jun 08
2
gem install mysql giving error on linux
Hi,
I have mysql installed on linux. Whenever I am trying t
"gem install mysql -- --with-mysql-dir=/usr/bin/mysql"
I am getting following error:-
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb --with-mysql-dir=/usr/bin/mysql
checking for mysql_ssl_set()... ***
2010 Jun 21
14
Controllers, what? why?
Hi,
I am starting to learn rails and I went through the guide and a couple
of tutorials. Even though I understand controllers or at least I can
use them I can''t see yet the whole picture.
Why do you need several controllers for a single application? If a
controller is just a class whose methods interface with models and
views, why not have a single controller for the whole application?
2010 Jul 14
1
ActiveRecord::Observer, update_all and has_many
Hi,
I''m using an ActiveRecord::Observer to log users changing data in my
application. However, I''ve noted that adding an item to a has_many
relationship gets logged, but removing the item does not. That is:
@product.users << user
is logged, but:
@product.users.delete(user)
is not.
I''ve dug into ActiveRecord and found that the underlying issue is that
the
2012 Sep 28
1
How the difference between Observer and Sweeper?
I''m think to use any to work with cache. How I should to use.
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
2010 Oct 03
1
Rails 3 observers
Rails Guides says:
...the UserObserver ... would be saved as app/models/user_observer.rb
and registered in config/environment.rb this way:
config.active_record.observers = :user_observer
But the observer registration above doesn''t work because there is no
''config''. For now, I''ve put it in the config/environments/[APP_ENV].rb
but that seems really sloppy and
2008 Jan 01
0
idmap_nss: Default domain not being used
I have an existing PDC which I am attempting to move across to a new
server. On the new server, I'm having trouble with idmap (using an LDAP
backend) and trusted domains. The smb.conf file is the same on both
servers. My idmap & winbind parameters are as follows:
ldap idmap suffix = ou=idmap
idmap backend = ldap:ldap://127.0.0.1
idmap uid = 10000-29000
idmap gid = 10000-29000
winbind