similar to: simple dumb rails from datastore question

Displaying 20 results from an estimated 30000 matches similar to: "simple dumb rails from datastore question"

2011 Feb 03
1
How to transfer a javascript value into a symbol used in Ruby on Rails
Hi, I am currently using Rails 2.0.2 with Ruby 1.8.7. My Prototoype.js version is 1.7(if required). I am basically trying to integrate the calendar_date_select plugin in my app. The link/tutorial I am referring is: http://ianli.com/site/HowTo/UseCalendarDateSelectRailsPlugin I am trying to save the date I receive through the date select plugin and store in a rails symbol :publishing_date. I am
2006 Jan 05
2
help - edit without using scaffold
Hello, What am I doing wrong? The code below does not show the current record for editing. def edit @user = User.find(params[:id]) end def update @user = User.find(params[:id]) if @user.update_attributes(params[:user]) flash[:notice] = ''User was successfully updated.'' redirect_to :action => ''show'', :id => @user else render :action
2006 Jun 13
1
How to give conditions in rails
Hi, I have Holiday table. the fileds are id,holiday_date,description. i added new records and list them also. when i listed all the records in the database are listed but i want to list only one particular year records. my holiday_list.rhtml page is as follows <%= stylesheet_link_tag "common", :media => "all" %> <%= error_messages_for ''holiday''
2006 Aug 04
4
DRY DRY DRY
Hello everyone! Ive been on rails for the last month or so and really enjoyed this framework. However its very hard to find documentation on how to do things right! For example every beginner after a while realizes that having similar CRUD actions in every controller and views for them is not DRY at all! Few days ago I found http://dereksivers.com/rails-shared-controller.html I quite like his
2010 May 04
2
Encoding problems, applying a patch, how to???
So, i''m facing issues with encoding, since I need to write an application in portuguese-brazilian. This is the error i''m getting: "incompatible character encodings: UTF-8 and ASCII-8BIT" The curious thing is that i have a few other views with "special" characters, like Á or Ç, and all of them works. I have saved this view using the UTF-8 char encoding and
2007 Apr 10
7
Newbie :: Help !!! (database record compare)
Hi all, I''ve a two simple table, resource ======= resource.id resource.name resource.contact and project ====== project.id project.name project.resource_id (id from resource table) I want to display list of project that only belong to particular resource. my proj.rhtml is like ===================== . .. ... <h1>Projects</h1> <table border="1">
2010 Aug 12
10
Scaffolding working...kinda
Hello all. I''ve been working through some online tutorials, learning ROR and have a question on scaffolding. Through the command promt i''ve ran the command: $ script/generate scaffold Albums This created the controllers, helpers, models, and views. I have a database table titled "albums" and have two records saved within The problem is that the scaffold command did
2006 Aug 17
0
super-newb needs help with has_many and other things...
I am brand new to oop and am having a difficult time getting my head around some ruby stuff. In specific, I am trying to create a library style app that lists topics, articles and comments. I have a table called topics, a table called articles and a table called comments. My models, controller and view are all listed below. What I want to happen is to have the list view list each topic along
2010 Jun 17
1
Help .. A question about if then
Please be gentile ... I am new at this ror thing I have a view which looks like this <h1>Nicaragua Stamps</h1> <table id ="stamps"> <tr> <th>Scott</th> <th>Maxwell</th> <th>Description</th> <th>Url</th> <th>Mint</th> <th>Used</th> </tr> <% @stamps.each
2006 Dec 28
1
Default Scaffolding Gives Errors
This is the default scaffolding for list.rhtml: [code] <h1>Listing <%= @scaffold_plural_name %></h1> <table> <tr> <% for column in @scaffold_class.content_columns %> <th><%= column.human_name %></th> <% end %> </tr> <% for entry in instance_variable_get("@#{@scaffold_plural_name}") %> <tr> <% for
2013 Sep 27
0
how to write “Destroy kid” in cucumber
how to write “Destroy kid” in cucumber: Scenario: User can delete kids Given I am on the kids page When I Destroy kid Then I should see "Kid deleted successfully" Then one kid should not exist <h1>Listing kids</h1> <tr> <th>Kid name</th> <th colspan=3>Action</th> </tr> <% @kids.each do |kid| %> <tr>
2009 May 13
1
[PATCH server] Cloud UI V1 (readonly).
This patch creates the shell for much of what the cloud ui will become. It is focused on layout (lightly fedora themed), accessibility, and 'bookmarkability'. This layout uses no javascript (that will be used to enhance interactivity in a future patch). It also introduces the idea of using a simple table rather than the more conplex js/json we use in the admin side. Plan here is to
2011 Jun 15
1
uninitialized class variable @@env in OCI8
Can anyone help me with the uninitialized class variable @@env in OCI8 error raised in my app\views\xxxx index.html.erb file Thanks in advance Below is the code and the result of bundle show. I am using Windows 7 <h1>Listing comics</h1> <table> <tr> <th>Title</th> <th>Issue</th> <th>Publisher</th>
2009 Feb 26
8
beginners question
hi group, I am making a little rails app to experiment with rails. It consists of one model, item, that represents an item on a todo list. A todo item has a description, a state (finished or not) and a due date. After changing the scaffold screens a bit, I wanted to be able to have no due date. I tried to do this by making a radio button; if ''no date'' is selected, the date
2009 Apr 10
0
MySql Memory Error
I am getting the following error when I try the following code. controller.rb def index @stats = SubscriptionPayment.stats if params[:page].blank? @subscriptions = Subscription.paginate(:include => :account, :page => params[:page], :per_page => 30, :order => ''accounts.name'') end index.html.erb <% @page_title = ''Subscriptions'' %>
2011 Feb 12
5
link_to a action in the controlles is not called
i have a link where it has to call a method defin in todoscontroller named say_when but show is called <td><%= link_to ''Say when'', todo, :action => :say_when , :remote => true %></td> class TodosController < ApplicationController # GET /todos # GET /todos.xml def index @todos = Todo.all respond_to do |format| format.html #
2009 Feb 10
0
Re: form_remote_for NOT passing param: I want put and I get
Your :method is in the wrong place, it belongs after the first hash, look at the docs for the form reote for -----Original Message----- From: Raimon Fs <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> Sent: Tuesday, February 10, 2009 5:08 PM To: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Subject: [Rails] Re: form_remote_for NOT passing param: I want put and I get
2006 Apr 07
1
Formatting form tags for children of parrent data?
This my first Rails project. All my previous work was done it Perl, so I may be missing the Ruby/Rails obvious here. The site I''m working on needs to display archived programs. Some of the programs have multiple versions, all belonging to the same listing. As such, I''ve set-up an extra_files table related to the archive list. Displaying the extra files was trivial. However,
2006 Jun 13
2
four days on rails - nil object when you didnt expect it
Hi all, Im trying to get my head around rails and to help along Im working through "four days on rails" as this seems to give a good real world example with multiple tables and relationships (the main thing I cant work out!) Ive got stuck. Some help would be really good here. The controller has this code: def list @category_pages, @categories = paginate(:category, :per_page =>
2009 Dec 28
2
How to get parameters to controller from view using <input tag?
Hello! I''m everywhere searching the answer for my question. How to get parameters to controller from view using <input tag. But I want to do this without db. I have the code: class TranslateController < ApplicationController def start @time = Time.now end def result @rez = params[:name] end end <html> <head> <title> Translate numbers from 10 to