search for: zven

Displaying 19 results from an estimated 19 matches for "zven".

Did you mean: even
2006 Apr 18
6
Postgresql and ActiveRecords problems
Hi all. I have a problem with postgresql PK columns and ActiveRecord. The error is: PGError: ERROR: null value in column "item_id" violates not-null. Ok, it''s wrong to insert NULL into PK columns, but rails doing it. How to fix? So sad..
2006 Apr 20
4
ActiveRecord: Many-to-Many problem
I am trying to make many-to-may relationship on classes Section and Content. Both Content and Section has: has_and_belongs_to_many :contents and has_and_belongs_to_many :sections and I have an exception when trying to access model properties: "undefined method `add_contents'' for #<Section:0xb745c514>" def add_content_entry @section = Section.find(params[:section_id])
2006 Apr 21
3
Conceptual q about rails
Classes like activerecord, etc contains strange elements like ''belongs_to :something'', ''has_many :smth'' etc.. what is it? I can''t find them in ruby lang documentation.. it''s similar to ''attr_accessor'' and other costructions, how I can create my own constructions and how I must understand them? Could anyone give me some links
2006 Apr 22
3
Gems installation into custom directory
I it possible to install gems into custom directory (user dir)? There no any specific parameters in setup.rm I don''t wanna see unpackaged binaries into my Debian system ;) Or maybe someone can send me a link with .deb''s? Thanks in advance.
2006 May 18
4
WebServices and DateTime - 3 elements of civil date are necessary
I simply trying to receive an array of objects, retrieved by ActiveRecord from table with datetime column and I have: test_list(SoapControllerApiTest): ArgumentError: 3 elements of civil date are necessary /usr/lib/ruby/1.8/date.rb:1214:in `new_with_hash'' /usr/lib/ruby/1.8/date.rb:1258:in `parse'' .... It''s a bug or I am wrong somewhere?
2006 Apr 23
4
ActiveRecord: Exclude some columns while fetching
I have models with large TEXT, BLOB columns and I don''t wanna fetch them everytime. Is it possible to omit columns when fetching records from DB? Sorry, if it''s trivial, but I can''t find helpful information in docs.
2006 Jun 16
3
ActiveRecord, using sql functions for some attributes
Hi. I need to use functions INET_ATON, INET_NTOA for IP address retrieving. Is it possible to make this transparently (without custom SQL for saving, updating and retrieving)?
2006 May 05
1
link_to - passing parameters
Hi. Is it possible to compose GET request using ''link_to'' and get passed params like: params[:foo][:bar]?
2006 Aug 06
2
better_nested_set plugin
Hi, I''m pleased to announce that the better_nested_set plugin is released. It ehances acts_as_nested_set, adding methods to move parts of the tree, like: * move_to_child_of * move_to_right_of * move_to_left_of Pass them an id or an object. Other methods added by this mixin are: * root - root item of the tree (the one that has a nil parent; should have left_column =
2006 Jun 02
1
Ajax: update multiple DIV''s
Hello. Is it possible to update multiple DIVs during? For example I have DIV for @flash[:notice], and one for content and I need to render both DIVs after executing action.
2006 Jun 07
2
Ajax: periodicaly_call_remote problem
Hello I am using ''periodically_call_remote'' to get some stats from database and display it every N seconds, it''s works fine, but when I rewriting (by page.replace ...) content of the DIV which contains ''periodically_call_remote'' definition request are still executing... How to fix this confuse? Thanks in advance.
2006 Jun 30
1
Retrieve table names
Hi. Is it possible to retrieve list of tables from database? I know about "show tables" (mysql) but I wanna keep application code independent from database server. I can''t find anything in rails activerecord docs... maybe someone know how? Maybe some plugins exists? Thx.
2006 May 13
3
ActiveRecord and cascade removing
Hi. Please help me how to make cascade delete for this 3 classes: class Section < ActiveRecord:Base has_many :ad_bindings has_many: banners, :through => :ad_bindings end class AdBinding < ActiveRecord:Base belongs_to :banner end class Banner < ActiveRecord:Base end When I remove Banner, I need to remove AdBinding also, but it still stored in database. Where I wrong?
2006 May 28
1
ActiveRecord: FK constraints problem
Hi all. I have has_and_belongs_to_many association between models: Section and Content. class Section < ActiveRecord::Base acts_as_tree has_and_belongs_to_many :contents belongs_to :default_content, :class_name => ''Content'', :foreign_key => ''default_content_id'', :dependent => :nullify end class Content < ActiveRecord::Base belongs_to
2006 Aug 02
2
Problem with date_select
Hi all. I have a big problem with date_select helper, because i guess it can''t resolve local variables to set correctly selected date. Small example: <% @client.charge_regs.each do |creg| %> <%= form_remote_tag with_progress(:url => { :action => ''foo'' }) %> <%= date_select ''creg'', ''valid_before'' %>
2006 Aug 04
1
ActiveRecord, Mysql, NULL columns and uniqueness
Hi all. Mysql allows to set multiple NULLs on columns with unique constraint, it''s normal SQL. Well, but when I try to submit some form, all unspecified values will be consodered as '''' (empty string) and (Mysql::Error: Duplicate entry occurs (((. How I can teach ActiveRecord to consider empty fields as NULL?
2006 Jun 10
0
Problem with ''periodically_call_remote''
My ajax-application have folowing behaviour: Just 1 page loaded with 1st request and all other content always loaded into special DIV using ajax when user clicked menuitems. On some "pages" I using ''periodically_call_remote'', but I can''t STOP it! Simple example: View: <div id="view"> <%= link_to_remote ''Stop tracking'',
2006 May 19
0
Migrations: The same class name form migration and model cause problems
I need to bootstrap my database when creating schema. My model class and migration class are the same. When I trying: ClassName.create :foo => ''bar'' in migration I got: undefined method `create'' for #<ActiveRecord::ConnectionAdapters::PostgreSQLAdapter:0xb75a357c> How to avoid this? I think the same class names causes problem, but I can''t change
2006 May 17
3
WebServices: execution expired
1 hour spent and I can''t got explanation why I have "execution expired" when I trying to test this web service: Pointed to: http://localhost:3000/news/list class NewsService < ActionWebService::Base web_service_api NewsApi def list [NewsTopic.new, NewsTopic.new] end end class NewsController < ApplicationController wsdl_service_name ''news''