Displaying 5 results from an estimated 5 matches for "storycontrol".
2010 Mar 05
15
Three submits, one controller
I have a ''new'' page with a submit for creating stories. On the ''show''
page the submit allows a user to enter comments. I now want a ''edit''
page for the stories with another submit for updates. I have used the
''create'' and ''update'' methods in the stories_controller on the ''new'' and
2008 Jul 08
3
undefined method `name' ...........
...without result, so I will try this....
I''m learning ROR, and I''m using Patrick Lens ''Ruby on Rails'' book.
(This is written for ror 1.x - and I''m using NetBeans 6.1 - ror 2.x -
this might be the problem...)
But...
I have made this Controller:
class StoryController < ApplicationController
def index
@current_time = Time.now
@s = Story.find_all_by_name(''sitepoint'')
end
end
and this view:
<h1>Story#index</h1>
hej
<%= @current_time %>
<%= @s.name%>
<p>Find me in app/views/story/index.html.erb<...
2008 Jan 06
8
ActionController::InvalidAuthenticityToken
Ruby noob here.
Just installed Rails 2.0, and am having trouble with updating DB
tables, using the ApplicationController.
My ApplicationController file looks like:
class StoryController < ApplicationController
protect_from_forgery :only =>
[:create, :update, :destroy]
scaffold :story
#def index
#@current_time = Time.now
#@story = Story.find_by_name(''arc'')
#end
end
But when I go to the browser to update the...
2006 Jan 16
0
[newbie] Redundant SELECTs?
...contents from the db), even if a Section with that id has
already been allocated during this query.
Is this true? If so, is there a way to make Rails cache ActiveRecord
objects by id (during a single request, of course)?
--Jens Alfke
PS: I''m using Rails 1.0 with sqlite3.
Processing StoryController#index (for 69.12.133.193 at 2006-01-15
22:42:06) [GET]
Parameters: {"action"=>"index", "controller"=>"story"}
Section Load (0.043420) SELECT * FROM sections WHERE (parent_id
= 0) ORDER BY created_at desc
Section Load (0.034256) SELEC...
2006 Jun 12
8
Input/output error on linux
...-- blogs at <http://www.recursive.ca/
hutch/>
Recursive Design Inc. -- <http://www.recursive.ca/>
Raconteur -- <http://www.raconteur.info/>
xampl for Ruby -- <http://rubyforge.org/projects/xampl/>
Processing StoryController#index (for 216.138.231.102 at 2006-06-12
07:34:38) [GET]
Parameters: {"story"=>"1144782860_45", "action"=>"index",
"id"=>"cdmb-migrated", "controller"=>"raconteur/story",
"pub"=>&quo...