Displaying 12 results from an estimated 12 matches for "story_id".
Did you mean:
store_id
2010 Jun 29
16
problem finding find current page
I have this bit of code in my email.controller
user = @current_user
story = @current_story
recipient = story.user
It doesn''t work because @current_story isn''t defined. How can I find the
current page to make this work?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
2010 Aug 06
4
Object/Record foreign key IDs set to zero
...by looking at the tables manually).
The example has two models: stories and votes. One story-->many votes
relationship.
The stories fixture:
one:
name: My shiny weblog
link: http://poocs.net/
two:
name: SitePoint Forums
link: http://www.sitepoint.com/forums/
The votes fixture:
one:
story_id: one
two:
story_id: one
three:
story_id: two
four:
story_id: two
You''d expect that ''story_id'' for two of the records in the votes table
would be set to the corresponding ID for the first story, and so on,
but what we find instead is that for all the records, the...
2011 Jan 15
3
respond_with javascript
...the corresponding create.js.erb,
and respond_to :html, :js, :xml in the controller. Heres the log when
I try and create a vote:
Started POST "/stories/3-asdfasdf1111/votes" for 127.0.0.1 at Fri Jan
14 20:46:36 -0800 2011
Processing by VotesController#create as */*
Parameters: {"story_id"=>"3-asdfasdf1111"}
SQL (1.9ms) SHOW TABLES
SQL (2.0ms) SHOW TABLES
SQL (2.5ms) SHOW TABLES
User Load (2.4ms) SELECT `users`.* FROM `users` WHERE (`users`.`id`
= 3) LIMIT 1
CACHE (0.0ms) SELECT `users`.* FROM `users` WHERE (`users`.`id` =
3) LIMIT 1
Story Load (2....
2005 Sep 06
6
strange behavior of acts_as_taggable
I was testing my models with this new library and I got:
>> s.tag "warp"
ActiveRecord::StatementInvalid: ERROR: inserción o actualización en la tabla
«tags_stories» viola la llave foránea «tags_stories_story_id_fkey»
DETAIL: La llave (story_id)=(8) no está presente en la tabla «stories».
: INSERT INTO tags_stories ("tag_id", "story_id") VALUES (''3'', ''8'')
from ./script/../config/../vendor/rails/activerecord/lib/active_record/connection_adapt...
2008 Jan 23
11
Rails 2.0.2 + RJS
...ment.id}"
page.visual_effect :highlight, "comment_#{@comment.id}", {:startcolor
=> ''"#84E003"''}
commentscontroller.rb:
def create
@comment = Comment.new(params[:comment])
@comment.user = User.find(current_user)
@comment.story = Story.find(params[:story_id])
respond_to do |format|
if @comment.save
format.html { redirect_to story_url(@comment.story) }
format.js
else
format.html { redirect_to story_url(@comment.story) }
end
end
end
I have tried changing to create.js.rjs, but that makes no difference?
Doe anyone h...
2002 Sep 07
1
rcopy.pl an Perl script for rsync (with XML config)
...)
* rsync (:-))
You can take this baby for a test drive at:
http://www.latinomixed.com/downloads/rcopy.pl
And you can read an article I did explaining it's usage (Spanish only, use
the Fish to translate -- http://world.altavista.com ) from this link:
http://www.latinomixed.com/article.php3?story_id=232
----)(-----
Luis Mondesi
System Administrator/Web developer
LatinoMixed.com
lemsx1@hotmail.com
You think Oedipus had a problem -- Adam was Eve's mother.
Be secured. Get the public signature here:
http://www.latinomixed.com/lems1/public-a.asc
_________________________________________...
2006 Feb 10
2
Sudden Strange Webrick Error: Errno::ECONNABORTED
...:
Errno::ECONNABORTED
An established connection was aborted by the software in your host
machine. - connect(2)
Here is the controller method:
def save_review
review = Review.new(params[:review])
@chapter = Chapter.find(params[:chapterid])
@chapter.reviews << review
review.story_id = @chapter.story_id
if review.save
ReviewAlerts.deliver_alert_author(@chapter.story.user,
@chapter.story, review)
flash[:Ajax] = "Review Successfully Submited"
render :partial => ''options''
else
flash[:Ajax] = "There was a problem w...
2007 Apr 13
0
mixin behavior
...count '',
:conditions => ["rateable_type = ''story'' AND
created_at >= ? ", date],
:group => ''rateable_id '')
totals = []
ratings.each do |rating|
totals << self.new(:story_id => rating.rateable_id,
:rating => rating.average_rating,
:count => rating.count)
end
self.transaction do
self.delete_all
totals.each do |total|
total.save
end
end
end
end
---
Then my models are pret...
2002 Sep 30
0
End Chinese Censorship at Yahoo!
...7.htm
http://hrw.org/press/2002/08/yahoo-ltr073002.htm
http://www.hrw.org/press/2002/08/yahoo080902.htm
http://www.apmforum.com/hariini/archives/000220.php
You have to be a subscriber to read the Economist
on-line article at:
http://www.economist.com/displayStory.cfm?Story_ID=S%27%29H%20%2DRQ%2F%24%210%20%24%0A
http://www.economist.com/
The following are resources offered by companies other
than Yahoo! This list is not comprehensive, feel free
to make additions.
Search engines
Alta-Vista http://www.altavista.com/...
2010 Jul 27
7
trouble with remote_form_for & html_update
...form.text_field :body %></div>
<p><%= submit_tag ''Comment'' %></p>
<% end %>
The form works i.e on refreshing the page the new comment is seen in the
comment partial.
From comments_controller
def create
@story = Story.find(params[:story_id])
@story.comments.create params[:comment]
flash[:notice] = "Thank you for commenting"
end
This is create.rjs
<script>
aremark = page.getElementById("aremark")
page.replace_html(''aremark'', :partial => "content")
</script>
This...
2013 Oct 21
4
Strange behaviour with ActiveRecord has_many collections, Rails 4 compared to Rails 3
Hi All,
I have been told to post discussion based topic on here instead of the
GitHub Issues.
I thought this ''could'' be a bug, but just need some clarification really.
The issue I posted is here <https://github.com/rails/rails/issues/12597>,
does anyone have any thoughts?
Again: https://github.com/rails/rails/issues/12597
Thanks a lot.
--
You received this message
2006 Jun 12
8
Input/output error on linux
...e_story.the_description and 0 <
@the_story.the_description.size then
14: %>
15: <div class=''pageDescription''><%=
in_place_editor_field :the_story, :the_description, {}, {:url =>
url_for(:id => @installation_id, :pub => @publication_id, :story =>
@story_id, :action => ''set_the_story_description''), :rows =>
15, :save_text => _("save"), :cancel_text => _
("cancel"), :saving_text => _("Saving...")} %></div>
16: <%
17: else
18: %>
/home/raconteur/gems/gems/actionpack-1...