similar to: How did I end up with read-only access?

Displaying 20 results from an estimated 6000 matches similar to: "How did I end up with read-only access?"

2006 Jun 07
1
has_many, through, want to store email in mysql
Hi, I''m still a new with ROR, but it''s really cool :) I just have this problem with a project of mine. I want to store email in a database. I already wrote a simple import script, that works, so that''s not a problem. Showing the email (efficiently) in a ROR site is. These tables are in the database: emails id email_id (foreign key -> emails.id) seq
2005 Sep 25
7
(newbie) Missing Template Error using Rolling With Rails Tutorials
Hi all, New to the list, Ruby, & RoR. I''ve been going through the Rolling With Rails tutorial, but am getting the following error when the instructions tell you to add the @recipes = Recipe.find_all line to the RecipeController: Template is missing Missing template ./script/../config/..//app/views//recipe/index.rhtml The index.rhtml file is right where it''s supposed to
2006 May 31
7
How do you create a controller & view to create a list of objects?
I''m trying to figure out how to design a view and controller to work with a simple collection. I have a Foo that has many Bars, so here''s what I did: $ ruby script/generate model Foo $ ruby script/generate model Bar (Uncomment t.column, :name: :string in foo and bar migrations) (Edit Foo.rb and Bar.rb, add has_many :bars to Foo, belongs_to :foo to Bar) $ rake db:migrate $ ruby
2006 Jan 03
6
Am I going too far or Rails is just confusing? was {validates_presence_of *_id attributes}
Thanks for the input Blair Zajac and Chris (Nolan and Hall), and for others. If all of you have time, please follow this (the question still relates to the previous posts by me): I have provided full steps to reproduce the symptoms. If it matters, I''m running Ruby 1.8.2, Rails 1.0, and MySQL 5.0.15 on Windows XP Professional. 1. First, the setup MySQL ----- create database testdb;
2006 Mar 01
1
observe_field question
I''m sure this is a simple problem, but I''ve been working on it for a couple days and can''t seem to figure out the correct way to structure my observe_field call. The HTML and Javascript generated all appear correct, but the AJAX call is never made. Below is the code I''m using and any help would be much appreciated. models_controller.rb def
2006 May 19
2
update_attributes
My application is so far mostly built from scaffold. When I edit an existing record (I''ve turned off validation) the update method is called. I get this error: NoMethodError in <module>/<controller>#update You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occured while evaluating nil.+ I get the same error when
2005 Dec 16
13
How to pass a collection to paginate?
There must be a better way to write this code: @project_pages, @projects= paginate :project, :per_page => 10, :conditions => ["account_id = ?", account] ?! If only I could pass the sub-collection account = ... @projects = account.project to paginate, instead of letting it extract it with a find :all + sql conditions Alain. -- Posted via
2006 Feb 27
8
Newbie question - Automatically update _form.rhtml?
Hi all, I''ve got an odd issue. I''m new to Ruby/Rails and have a bit of a silly question. I''m following along with the nice little tutorial here, to get an idea of the system: http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=3 However, I''m running into an issue where the author adds a new field in his database, refreshes the browser and shows
2006 Mar 09
11
syncPEOPLE on Rails TextMate Bundle 1.0 & Screencast
The 1.0 version of our bundle is now available for download, along with a 10 minute demonstration of it in use. See http:// syncpeople.com/downloads. == What is syncPEOPLE on Rails? == syncPEOPLE on Rails is a bundle of snippets, macros and commands for TextMate that make Rails development on the Mac even easier. Generate scaffolds, migrations, models and controllers from inside the
2006 Mar 15
5
acts_as_threaded - help ???
Hi, has anyone successfully used the acts_as_threaded plugin with postgresql? I''m using rails 1.0 and ruby 1.8.4 on linux. Following the screencast on http://www.railtie.net/articles/2006/02/05/rails-acts_as_threaded-plugin , I got to where we''re ready to create our first post, having made the changes to controllers/posts_controller.rb, views/posts/_form.rhtml,
2005 Dec 16
12
validates_presence_of not working
Hi, I''m new to ruby and rails. I just created a simple update page and the update works fine if all form fields are filled in. However there is one field that should never be allowed to be blank. So I put this in my model: class Topic < ActiveRecord::Base validates_presence_of :dr_title validates_length_of :dr_title, :minimum => 1 So, when I submit the form with a blank
2006 Jul 19
4
How do I overwrite/extend a scaffold module?
I have many pages to generate quickly. They are based off of the scaffold generator, but I want to convert the rhtml files to Markaby, and change some formatting. Without having to do a lot of repetitive hand editing. Is there a simple way to overwrite/extend part of the scaffold generator? Do I need to write my own from scratch? -- Best Regards, -Larry "Work, work, work...there is no
2012 Feb 01
6
Does Devise make use of a "status" method? Weird bug.
So I''ve inherited a legacy application and I''m trying to work around the edges as I put an admin tool interface on top of the existing code base. I install Devise for user authentication, since I''ve used it in the past. I change none of the default code. And yet, on successful sign in, I get an error: Render and/or redirect were called multiple times in this action.
2006 Jan 12
9
Scaffold shows all attributes altough I use attr_accessible!
Hi all I have a Model like this: class Member < ActiveRecord::Base attr_accessible :username, :email, :first_name, :last_name end I have created a scaffold using script/generate scaffold member members Using the URL localhost:3000/members/edit/1 I can edit all attributes, including created_at, lock_version etc.! But it should only show the attributes I listed in attr_accessible! What
2010 Aug 03
2
Strange error message when rendering the scaffold form
Hello everyone, I am developing my application and I created a scaffold called listas, but when I acess /listas/new I get this error message: NoMethodError in Listas#new Showing /home/rodrigo3n/code/listeiroo/app/views/listas/_form.html.erb where line #15 raised: undefined method `deep_symbolize_keys'' for nil:NilClass Extracted source (around line #15): 12: <% end %> 13: 14:
2006 Jan 02
19
AR: How to store and restore in YML.
Hello- I have a database with entries that are segmented by customers. I would like to be able to store / delete / restore a particular customer''s information. I will need to rebuild the rows on restore and also rebuild the associations for the different tables. For example, customer { id name } companies { id customer_id (belongs_to) name } contacts { id
2008 Mar 17
2
Dynamic actions and views
Hi, I have a set of messages stored in the db. These are email messages that I have to send based on some condition. This is not the way I had been doing all these days. I used to create an action in my controller (class Notifier < ActionMailer::ARMailer) and then create an rhtml file with the email content and then say Notifier::deliver_my_email_message to send out the emails. But now that I
2006 Jan 24
14
A bad day with Action Mailer
Hi, I''ve setup Action Mailer today to email the contents of a form. Every seemes fine except when the email is sending. Here is the error I get on the production server: SocketError (getaddrinfo: Name or service not known): /usr/lib/ruby/1.8/net/protocol.rb:83:in `initialize'' /usr/lib/ruby/1.8/net/protocol.rb:83:in `new''
2006 Jan 27
20
bundled_resource v.0.9
Original announcement at http://blog.inquirylabs.com/ [1] == What is bundled_resource? == If your development is in any way similar to mine, there are a number of useful resources out there that make web applications shine beautifully. For example, there?s the Dynarch calendar and the textarea tools. There are a number of others?too many, in fact. The problem is that as a web developer,
2006 Feb 07
3
Creating a new object with a passed in parent?
I have a simple object, Article, which has_one :parent of the same time. On my Show page for a given article there will be a "new child" button which will pass the current :id (or the current Article itself) to the new form. What is the proper way to hide a reference to this parent in the form so that when it is submitted back, the create method knows what to do with it?