search for: content_id

Displaying 20 results from an estimated 22 matches for "content_id".

2006 Apr 14
1
Script.aculo.us Effects with callbacks not working as it should.
...{ printfire.args = arguments; var ev = document.createEvent("Events"); ev.initEvent("printfire", false, true); dispatchEvent(ev); } } function set_content_and_editor_variables(content_id) { // First create the object that we will turn into a hash. var content_and_editor_variables = { content_container: "content_container_" + content_id, content_or_editor: "content_or_editor_" + content_id, content_editor: &...
2006 Mar 17
2
Security issue dealing with comment posting - anyone?
...ed other things, and can''t get anything else to work. #currently def comments content = Content.find(params[:id]) @comment = Comment.new(params[:comment]) content.comments << @comment content.save if @comment.save then @comment_count = Comment.count("content_id=#{params[:id]}") render_without_layout else render :text => "Error" end end #what i''ve tried def comments ... if @comment.save then @comment_count = Comment.count(:conditions => ["content_id=?",...
2008 Jul 09
2
build matrix with the content of one column of a data frame in function of two factors
Hello, First, thanks for your help (and sorry for my english !) I have a data frame in which each row represents a vote (in percent, only 20,40, 60,80,100) of one person on one content, with three columns : name (the name of the voters), content_id, vote : str(votesredac) 'data.frame': 1000 obs. of 3 variables: $ name : chr "Guillemette Faure" "Guillemette Faure" "Guillemette Faure" "Pascal Rich\xe9" ... $ content_id: num 385241 384926 384635 383266 384814 ... $ value : num 100...
2006 Mar 13
5
Displaying related entries by tags - HELP!
...=> tag.name.to_s }.join(", ") %> <p><%= post.entry %></p> <% end %> #layout <% for related in @contents_related %> <li><%= related.title %><br /></li> <% end %> #controller (how do I pass the tag_id and the content_id?) @contents_related = Content.show_related_entries(?,?) #model def self.show_related_entries(t_id, c_id) find_by_sql("select c.title from contents c inner join contents_tags ct on c.id = ct.content_id where ct.tag_id = #{t_id} and c.id != #{c_id}") end The function works if I ma...
2006 May 11
1
Including dynamic list of params in link_to
How do I include all incoming URL parameters (i.e. list_content.rhtml?content_id=23) in my link_to statements? I know I can include specific parameters in the link_to, by using ":variable_name => 123" in the link_to statement... But what If I dont'' know what the incoming parameters will be... and I simply want to include them along with any other spe...
2009 Oct 04
3
Problem using ActiveRecord find with :joins and :select
Hi guys, When I do: temp = User.find(:all, :joins => "INNER JOIN contents ON users.agent_id = contents.id", :select => "contents.id, users.id, users.u_date") temp.first.inspect It seems to work fine, but it only returns: #<User id: 6, u_date: "2009-10-03 19:32:23"> but not the contents.id information. I
2005 Nov 23
0
Another CTI question
I''ve asked some CTI questions before and I have another one based on my migration progress. These are two condensed tables (the actuals being bigger): Content +-------------+ | id | | title | | description | | etc..... | +-------------+ ContentJob +--------------+ | content_id | | location | | date_expired | | etc..... | +--------------+ The above is legacy stuff and I can''t really change it right now as it''s live; my goal is to get Rails to use the existing infrastructure and then later make changes. My AR object is below: class Content...
2006 Nov 04
0
one to many relationship; has_one
...el using rails scripts and then edited the models as follows class Content < ActiveRecord::Base has_one :location end class Location < ActiveRecord::Base belongs_to :content end When I attempt to access content.location I get this error |RuntimeError: ERROR C42703 Mcolumn locations.content_id does not exist Fparse_func.c L1036 Runknown_attribute: SELECT * FROM locations WHERE (locations.content_id = 9) LIMIT 1| I have been able to work around this by defining the association in the content class as has_many :location, :finder_sql => ''SELECT * FROM locations WHERE locat...
2006 Apr 03
2
Order By Number of Comments
...def show_discussed @contents.find(:all, :order => "contents.comment.size DESC", :joins => "comments") end I have got some SQL that works : (I renamed posts to contents) select contents.*, count(*) as comment_total from contents, comments WHERE contents.id = comments.content_id group by contents.id; But this does not return the posts with no comments. I would really appreciate any help. Thank you in advance. Hamza -- Posted via http://www.ruby-forum.com/.
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 :section end When I trying to remove some Content which associated with Section I have an error related to foreigh key violation: "PGError: ERROR: update or delete on "contents" violates f...
2006 Apr 18
0
custom content widget design
...pository for all data in the content table, serializing the widgets data to YAML for storage and retrieval in a database text field. My model looks like so: class Content < ActiveRecord::Base serialize :content end and my table : DROP TABLE IF EXISTS `contents`; CREATE TABLE `contents` ( `content_id` bigint(1) NOT NULL auto_increment, `tag` char(25) default NULL, `user_id` char(50) default NULL, `content` longtext, PRIMARY KEY (`content_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; What would be the correct way to validate data in this situation? Opinions/insight will be greatly app...
2006 Apr 20
4
ActiveRecord: Many-to-Many problem
...ontents 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]) @content = Content.find(params[:content_id]) @section.add_contents(@content) @section.name = ''test'' @section.update redirect_to :action => ''list'' end Where I am wrong?
2006 Mar 17
1
How to handle errors - HELP
...code? Do I use "rescue nil" or something? Here''s my controller: def comments content = Content.find(params[:id]) @comment = Comment.new(params[:comment]) content.comments << @comment content.save @comment.save @comment_count = Comment.count("content_id=#{params[:id]}") render_without_layout end If the comment is blank, then do I want to rescue the nil, then "render :text => ''Please fill out the fields.''"? Then in my remote form options, on the :update, I could have: :update => {:success => '...
2006 Mar 17
0
Returning from Ajax call - "redirect_to error"
...With the second line continuing forever. Here''s my controller: #controller def comments content = Content.find(params[:id]) @comment = Comment.new(params[:comment]) content.comments << @comment content.save @comment.save @comment_count = Comment.count("content_id=#{params[:id]}") render_without_layout end #remote form <%= form_remote_tag( :url => {:controller => ''inventory'', :action => ''comments'', :id => content.id}, :update => {:success => "new-comment"},...
2008 Jun 25
1
Samsung OfficeServ 500
Samsung OfficeServ for OS500 PBX cannot run - 'Run-time error 3633' err:iphlpapi:getRouteTable Received unsupported sockaddr family 0x12 err:iphlpapi:getRouteTable Unexpected address type 0x10 err:iphlpapi:getRouteTable Unexpected address type 0x20 err:iphlpapi:getRouteTable Received unsupported sockaddr family 0x12 err:iphlpapi:getRouteTable Unexpected address type 0x10
2001 Feb 26
3
Xiph.org announces Vorbis Beta 4 and the Xiph.org Foundation
Long awaited, but finally here - http://www.vorbis.com. Beta4 is out the door :) Below is a copy of the press release, which you can find here: http://www.vorbis.com/press/20010226.txt And a Binary Freedom article that went out today: http://www.binaryfreedom.com/content.php?content_id=26 jack. ----- Ogg Vorbis Creators Announce Formation of Xiph.org Foundation Coincides with Release of Beta 4 and Major Licensing Change Xiph.org, creators of the Ogg Vorbis audio codec, Icecast streaming media server, Cdparanoia, and other multimedia software, are announcing the formation of...
2001 Feb 26
3
Xiph.org announces Vorbis Beta 4 and the Xiph.org Foundation
Long awaited, but finally here - http://www.vorbis.com. Beta4 is out the door :) Below is a copy of the press release, which you can find here: http://www.vorbis.com/press/20010226.txt And a Binary Freedom article that went out today: http://www.binaryfreedom.com/content.php?content_id=26 jack. ----- Ogg Vorbis Creators Announce Formation of Xiph.org Foundation Coincides with Release of Beta 4 and Major Licensing Change Xiph.org, creators of the Ogg Vorbis audio codec, Icecast streaming media server, Cdparanoia, and other multimedia software, are announcing the formation of...
2001 Feb 26
3
Xiph.org announces Vorbis Beta 4 and the Xiph.org Foundation
Long awaited, but finally here - http://www.vorbis.com. Beta4 is out the door :) Below is a copy of the press release, which you can find here: http://www.vorbis.com/press/20010226.txt And a Binary Freedom article that went out today: http://www.binaryfreedom.com/content.php?content_id=26 jack. ----- Ogg Vorbis Creators Announce Formation of Xiph.org Foundation Coincides with Release of Beta 4 and Major Licensing Change Xiph.org, creators of the Ogg Vorbis audio codec, Icecast streaming media server, Cdparanoia, and other multimedia software, are announcing the formation of...
2001 Feb 26
3
Xiph.org announces Vorbis Beta 4 and the Xiph.org Foundation
Long awaited, but finally here - http://www.vorbis.com. Beta4 is out the door :) Below is a copy of the press release, which you can find here: http://www.vorbis.com/press/20010226.txt And a Binary Freedom article that went out today: http://www.binaryfreedom.com/content.php?content_id=26 jack. ----- Ogg Vorbis Creators Announce Formation of Xiph.org Foundation Coincides with Release of Beta 4 and Major Licensing Change Xiph.org, creators of the Ogg Vorbis audio codec, Icecast streaming media server, Cdparanoia, and other multimedia software, are announcing the formation of...
2008 Jan 02
6
problem when editing record in polymorphic relation
...:as => :content end class HardwareCi < ActiveRecord::Base has_one :ci, :as => :content end class Ci < ActiveRecord::Base belongs_to :content, :polymorphic => true end The table, cis ,contains the following records ============================================= id | ci_number | content_id | content_type ----+----------+-----------+------------+-------------- 1 | CI1 | 1 | SoftwareCi 2 | CI2 | 2 | SoftwareCi 3 | CI3 | 1 | HardwareCi 4 | CI4 | 2 | HardwareCi The table, software_cis ,contains the following records ==...