Displaying 20 results from an estimated 200 matches similar to: "Displaying related entries by tags - HELP!"
2006 Mar 17
2
Security issue dealing with comment posting - anyone?
This is how I''m posting comments currently. This works, but I read
somewhere that I shouldn''t inject params right into my sql query,
because it makes it easy for people to hack in and ruin the db. I''m not
sure if this even makes sense, but I''ve tried other things, and can''t
get anything else to work.
#currently
def comments
content =
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
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 specific variables I
2006 Apr 03
2
Order By Number of Comments
Hi,
I am new to Ruby on Rails, so I apologise if this has been answered
elsewhere. I have had a look through the list but I can''t seem to find
what I am trying to do.
I have implemented the standard blog and comments app from the
screencast. However I am trying to extend the functionality.
I want to be able to display a list of posts and order them by the total
number of comments
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 Mar 17
1
How to handle errors - HELP
I''m having trouble with my Ajax comments, but only when someone clicks
the submit button when there''s no comment. How can I handle this in my
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
2006 Apr 14
1
Script.aculo.us Effects with callbacks not working as it should.
Hello all!
I''m having a problem which is driving me insane.
It''s probably related to the fact that I''m new to javascript.... :)
Here''s the thing, I have a couple of effects which are all being put
in the queue.
Some of these effects have callbacks; e.g. "afterFinish".
But the calback is being made directly instead of after the effect is done.
The
2005 Mar 30
2
Production Log Analyzer 1.1.0
First public release of Production Log Analyzer!
Download it at:
http://rubyforge.org/frs/?group_id=586
The Production Analyzer lets you find out which pages on your site are
dragging you down. pl_analyze requires the use of SyslogLogger
(included) because the default Logger doesn''t give any way to associate
lines logged to a request.
SyslogLogger gives you many other
2010 Aug 13
11
Link to remote and the equivalent in Rails 3
Hi
WOW! Is Rails 3 another interesting learning curve. Just when I think
I have a general working knowledge of Rails 2 ... things change.
I''m trying to replicate the following in Rails 3:
<%= link_to_remote image_tag("creditcard.png", :border => 0), :url =>
{:action => :make_payment, :type => "Credit", :id =>
@appt.id },
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
2006 Nov 04
0
one to many relationship; has_one
I''m new to ruby and rails and as a result am a bit lost on implementing
a one to many relationship. In my DB I have 2 tables contents and
locations, contents contains the foreign key location_id. I generated a
content and a location model using rails scripts and then edited the
models as follows
class Content < ActiveRecord::Base
has_one :location
end
class Location <
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
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 Apr 18
0
custom content widget design
Hello all,
I am trying to design a reusable widget content system, where I can easily lay
out a bundle of widgets on a page and allow a user with proper administrative
rights to click and change them.
For the database storage, I don''t want to have to create a new table for every
different classification of widget (ie, list, text body, image, etc). I
would like to create a central
2013 Nov 10
3
accepts_nested_attributes_for how, example
I have following tables with following models:
users(id, role_id) *has_many :entries*
categories(id, category_name) *has_many :entries*
entries(id, category_id, user_id) *belongs_to :user, belongs_to
:category, has_one :storage*
storages(id, title, content, entry_id)* belongs_to :entry*, *has_one
:vote*
votes(id, count, storage_id) *belongs_to :storage*
Now,
2008 Nov 27
7
will_paginate issue
Hi,
I am trying paginate (will_paginate) users posts. It is counting and
showing the page links correctly, but still showing all the posts on one
page.
@entries = @user.entries.paginate :per_page => 5, :page =>
params[:page], :order => ''created_at DESC''
If I change it to @entries = Entry.paginate :per_page => 5 ........
It is fine, but I would like to show only
2006 Mar 17
0
Returning from Ajax call - "redirect_to error"
I have Ajax commenting on my site, well, I''m trying to get it working.
It worked fine locally, but when I posted to the server, I''m getting an
"Application Error (Rails)", and I checked the logs, and it has:
(stack trace too deep)
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:447:in
`url_for''
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
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