similar to: Three submits, one controller

Displaying 20 results from an estimated 30000 matches similar to: "Three submits, one controller"

2010 Mar 06
7
form_for, submit, and parameters disappearing
Consider the following: -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to
2011 Jan 05
16
Nicedit (rich text editor)
Hello, I''m trying to use Nicedit to improve my text_areas in some views of my project. I have installed jquery: ruby script/plugin install git://github.com/aaronchi/jrails.git nicEdit plugin: ruby script/plugin install git://github.com/sergio-fry/Simple-nicEdit.git Add js in layout: <%= javascript_include_tag ''nicEdit'', ''nicEditInit'' %> Use it
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 Mar 29
6
Updating records
So I would like to be able to update a record without having to load the edit page. Lets use checking out a book as an example. From the front page of my application I would like to be able to have a form field where I can enter a record id and select one of a couple of check boxes and then hit submit which will update the associated record with the action selected by the check box (check out,
2012 Apr 14
7
undefined method `model_name' for NilClass:Class
Hi guys, I just started using Ruby on Rails. After implementing the RoR blog tutorial I started with my own data model. Sadly I am not able to get my create page running. Model: class Activity < ActiveRecord::Base validates :activity, :presence => true validates :forKids, :presence => true validates :start_date, :presence => true end Controller: class ActivitiesController <
2013 Mar 06
1
How to create multiple submit paths for form_for?
I''ve been researching this for some time and there doesn''t seem to be an easy solution. I have a form_for that submits materials. As usual, when it edits an existing material it automatically goes to the update action. This is fine. However, I want to have a second submit button "Save As" that allows a user to save another version of the material. This second
2011 Dec 17
7
How to fire Ajax call from Form_for
I am learning Rails 3 and need some help on Ajax part. I am trying to accomplish the following: There is a textarea on the page which has a length of letters constraint, say 100. Every time a symbol is typed there,a nearby label tells you how many letters you have left. I plan to use Ajax to do this. I googled for a few hours and could not figure out how to do this. So far what I have done is
2010 May 10
7
NilClass passed to partial view
Hi, I have a simple program that tries to do something really basic. First, I have a company Model : ------------------------------------- class Company < ActiveRecord::Base has_one :billingAddress, :foreign_key=>"id", :class_name=>"Address" end Then I have the address Model : -------------------------------------- class Address< ActiveRecord::Base belongs_to
2011 Aug 11
17
f.collection_select: what are the parameters?
The rails docs are so horrible on the collection_select method. They need to show a *complete* form, and show two examples: one that calls f.collection_select(), and another that calls collection_select(), and explain the differences. Given this line: f.collection_select :topic, Topic.all, :id, :category What the !@#$!@#$ is :topic? -- Posted via http://www.ruby-forum.com/. -- You received
2012 Jan 05
3
composite keys and association
i have two table, comment and post, both have composite keys, and no id column, comment belongs to post, i follow the instruction of http://compositekeys.rubyforge.org/, and it seems successfully, (But i still cant confirm to put require ''rubygems'' and require ''composite_primary_keys'' on which file ). I can do the CRUD operation for post,then i want to create
2010 Sep 28
4
Unitialized constant controller
Hey guys, Here''s an error I get after I hit the submit button on the editing page: NameError in ClassifiedsController#update uninitialized constant ClassifiedsController Help would be appreciated. Thanks -- 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
2010 Mar 09
9
Ajax-submit form on "check box onclick ": why this error?
Hi there, I need to have a checkbox which ajax-submits a form. The following code throws an error "index 112009 out of string". What''s wrong here? ============================================== <% form_remote_tag :url => { whatever_url } do -%> <%= check_box_tag ''whatever'', nil, whatever, { :onclick =>
2012 Apr 21
13
issues with changing directory structure in rails3
class BranchesController < ApplicationController def branch @branch = Branch.new (params[:branch]) branch_back = @branch.*branch* end end in the model have one *branch.rb* class Branch def branch end end In the view have one branches folder, also have the branch.html.erb in that folder. <%= form_for(@branch) do |f| %> <%end%> *routes.rb* * * match
2011 Jan 24
11
Can't get login to work
Hi, could anybody help me try to get a login function working, I have created a database for users called user1, I have the login screen set up but when i hit login with a correct username and password, nothing happens I am expecting the lgin button to direct the user to the main page and show the user as logged on, but nothing happens! Thanks! Controller class User1Controller <
2013 May 04
21
Getting started w/ Rails 4
Hi. I''m trying to run Getting started tutorial under Rails 4.0.0.beta1 although it assumes it runs on Rails 3. I was able to get rid of all errors by wrapping post_params here and there, and installing protected_attributes Gem for attr_accessible to make sense. Post/ comment CRUD works just fine, but I don''t seem to be able to add Tags (the final part of the tutorial). Post saved
2012 Aug 16
6
undefined method `with_indifferent_access' for "":String
Hi I''m having a issue with one object when try to update the attributes in this object previously saved in the database I have one object comp and one object reg they have this relationship comp has_many regs reg belongs_to comp when run use the method valid? like this current_contribuyente.comps.build(params[:comp]).valid? it returns: IndexError (string not matched) And when
2010 Sep 01
5
validation errors bring up stack trace error page
hello! I made some custom validations for my app, which do catch invalid data in the console. However, when I enter invalid data through a form on the browser view, I get your stack trace error style page (similar to what you see when you get a syntax error or a nil object) instead of the nicely styled error messages (what you would see in a scaffolded application. First off, what is the stack
2010 May 26
6
Understanding Form_for
OK, so I''m an absolute noob at Ruby on Rails. I''ve read a lot of information I can find about form_for and most of them use form_for to create new items that get saved into the database and can be viewed later to edit, destroy, etc. In this case, the database will fill up with whatever the user wrote and I just want my program to have no information stored. I''ve been
2012 Jan 20
3
Fields_for adding html (text) for hidden field
Hello all, I''m getting this weird ''<input name value=''2'' type=''hidden'' />'' text printed out in my form. See attached image. I''ve spent too much time trying to figure it out already and it''s not going to stop me from moving on for now. As you can see it''s still very early on. I''m using
2011 Apr 30
8
"uninitialized constant PostsController::Post"
This time i read scaffold tutorial very carefully and finally try to generate a form without using the scaffold(just used a controller and view ).what i have done till now ,is as follow.Using rails 3.0.7. "rails generate controller posts index" 1) post_controller.rb class PostsController < ApplicationController def index @post=Post.new