Displaying 20 results from an estimated 35 matches for "sitepoint".
2008 Jul 08
3
undefined method `name' ...........
...s'' 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</p>
And, when browsing my ''story'' (http://localhost:3000/story), I get
this error:
undefined method `...
2007 Oct 03
1
FREE PDF - SitePoint's Ruby on Rails book
Apologies for the self-promotion, but some of the Rails newbies out
there may be interested in knowing that our beginner''s Rails book is
now available as a free PDF (the full thing, not just a sample).
http://rails.sitepoint.com/
Personally I think it''s the best beginner''s Rails book out there, but
of course my bias is going to be questionable as I edited the thing.
The offer is good for 60 days.
Cheers
Matt
--~--~---------~--~----~------------~-------~--~----~
You received this message because y...
2006 Jan 11
2
Good OOP and JS books / tutorials? Looking to teach my team
Can anyone recommend good books, online tutorials, or any other learning
materials for Javascript - specifically Object Oriented Programming using
JS?
I want the rest of my dev team to be able to help me code in JS,
specifically using prototype and scriptaculous. I''ve been using JS for so
long, and I kinda "grew up" on OOP programming but my whole team is
Coldfusion
2009 Oct 19
9
Can (should) each :user have his own table?
I was reading this article a while back
http://www.sitepoint.com/blogs/2008/06/06/did-rails-sink-twitter/
and it got me thinking. If I wanted to set up my app so that each
user has his/her own table, how would I go about doing that?
"create_table :users" just creates a table in the database for a list
of all the users (which I guess I''d...
2006 Feb 14
4
Fine grained access control
Hi,
I''m building an application which is going to require quite fine grained
access control. Deciding if a user is allowed to access an action will
probably require checking quite number of different rules, so a simple
role-based system won''t be flexible enough.
The approach I think I will try first is, if it''s possible, to ignore
permission issues inside the
2006 Jan 12
0
RE: re: Good OOP and JS books / tutorials?
You could also check out the following tutorials.
I found these pretty helpful.
SitePoint Articles:
http://www.sitepoint.com/print/oriented-programming-1
http://www.sitepoint.com/print/oriented-programming-2
Thank you,
Mandy.
2008 Jan 21
1
JavaScript book recommendations
...I take it that everyone serious about using Prototype & Co. already has
Christophe''s (Porteneuve) Prototype and Script.aculo.us book. Apart
from that, I''d like to point out two new, library-agnostic books:
Cameron Adams and several others
The Art & Science of JavaScript
Sitepoint 2008
http://www.sitepoint.com/books/jsdesign1/
(excerpt: http://www.sitepoint.com/print/art-science-javascript)
The title is quite a mouthful ("science"?). From my limited perspective
this is currently the only book that really touches on advanced topics.
I particularly recommend the c...
2006 Apr 19
3
Determining screen size and/or resolution?
What''s the easiest or best way to determine the screen size from within a controller or view in Rails? My "divs" look great at 1280x800, but not so hot on 800x600. I want to dynamically alter the layout based on the resolution. Any hints regarding screen size or alternate ways of handling this issue would be appreciated.
Thanks!
-------------- next part --------------
An
2008 Dec 20
3
undefined method `stories_path'
...81215/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/helpers/form_helper.rb:248:in
`form_for''
/var/www/html/railsapps/shovell/dev/app/views/stories/new.html.erb:1
controller:
class StoriesController < ApplicationController
def index
@story = Story.find_by_name(''SitePoint Forums'')
end
def new
@story = Story.new
end
end
view:
<% form_for @story do |f| %>
<p>
name: <br />
<%= f.text_field :name %>
</p>
<p>
link: <br />
<%= f.text_field :link %>
</p>
<p>
<%= submit_tag %>...
2007 Apr 02
19
Pref for beginner book: Wrox (Holzner) or Ruby for Rails?
I''m a beginner. I''ve done the apple tutorial, Agile ROR (the depot
app, I stopped after that, a little to advanced with no base knowledge
of Ruby), Why''s guide and my copy of Chris Pine''s book today. After
Pine, I''m going to buy either the Wrox book or Ruby for Rails book. I
did a search and there''s not too much on the Wrox book (Holzner)
2013 Aug 29
4
linkedin gem
Hi,
I am following this post *
http://www.sitepoint.com/ruby-social-gems-linkedin/* for using linked gem
and API for getting profile and other stuff
But at the end I am getting this error:
=> Booting WEBrick
=> Rails 3.2.13 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown ser...
2007 Jan 31
2
rspec + CakePHP
Hi,
I am in a situation where I am going to have to rewrite a working Ruby
on Rails application in CakePHP with PHP5. I have a whole bunch of
specs written with rspec, and I was wondering if it would be possible
to somehow use these specs to test the Models and Controllers that I
am rewriting in CakePHP. I am going to be basically just exactly
duplicating the Rails application, with identical
2006 Jan 16
2
acts_as_tree with Modified Preorder Traversal?
Has anyone extended Rails''s acts_as_tree to use the Modified Preorder
Traversal algorithm? This is a really clever trick for optimizing
access to trees stored in databases, as described lucidly in this
article:
http://www.sitepoint.com/article/hierarchical-data-database/2
It adds two integer fields, a "left counter" and "right counter", to
each row. By updating these in the right way as rows are inserted and
deleted in the tree, you can use them to reduce a lot of common tree
operations -- like gett...
2006 Feb 24
4
Rails Newbie Forum?
Hi all.
I''m a new convert (or at least I want to be a convert) to Rails. I''ve
got the book, have read it, done bits and pieces of the demo, and tried
to apply it to a rather complicated DB I''ve got here. I''ve got a ton of
questions, and before I bore everyone here, is there a dedicated forum
for Rails newbies to get help?
Yak
--
Posted via
2006 Feb 27
4
2 belongs_to to the same parent table
Hello!
I have 2 table: users and buddies
User: id, name, ...
Buddy: id, user_id, user_buddy_id, ...
So if you have 2 users 1,jack and 2,fred and fred is a buddy of jack,
there is a Buddy object: id=1, user_id=1, user_buddy_id=2
I can declare only one belongs_to in Buddy and one has_many in User. And
there is conflict if I had the second one (the first one is discarded)
class User
has_many
2010 Aug 06
4
Object/Record foreign key IDs set to zero
...ated
with the foreign record''s ID, but instead is simply 0 (discovered this
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 t...
2007 Oct 04
12
Rails' abilities fitting?
Hi,
I''m looking at developing a reasonably complex web application, where
most of the complexity actually lays in the database and the queries
I need run on it. Some "classes" or models need to consist of an
assembly of several tables. It would be trivial enough for me to code
these queries in SQL, but as far as I understand Rails is trying to
hide the database as
2007 Mar 20
6
how to set a maximum length for text area in rails
how to set a maximum length for text area in rails
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email
2006 Feb 21
7
Self-referencial habtm relationship
Heyo!
I am setting up a self-referencial habtm relationship with the users
of my app. I am using Chad Fowler''s "Rails Recipes" to get me started,
and everything works great with the join table "people_friends". I add
friends by doing somebody.friends << somebodyelse. However, with my
app, there is an approval process so my join table has columns
person_id,
2006 Mar 13
2
Rails : Objects, Patterns and Practice
I''m currently learning Rails and reading PHP5 Objects, Patterns, and
Practice.
Its a great intoduction to Singletons, Factories etc but can anyone
recommend a similar resource for Rails or failing that Ruby. ?
thanks
Tony
--
Posted via http://www.ruby-forum.com/.