similar to: Rails 3 - AJAX Response

Displaying 20 results from an estimated 1000 matches similar to: "Rails 3 - AJAX Response"

2010 Jun 09
1
[patch] fix bytesize in exception template; multibyte titleize
Hi all, I wanted to draw some attention to a couple of very small multibyte-related patches I believe should be included before Rails 3.0 RC1: * Use String#bytesize rather than String#length in exception templates: This is a simple case where string length is checked, but bytes is needed, so it breaks with string with multibyte chars.
2006 Mar 19
1
some strange behavior for has_many with STI
Hi all, I''m having some trouble with a has_many association on a table using the single table inheritance model that I''m hoping someone can help me with. The schema for the table is: CREATE TABLE `comments` ( `id` int(11) NOT NULL auto_increment, `user_id` int(11) default NULL, `type` varchar(20) NOT NULL default '''', `type_id` int(11) NOT NULL default
2006 Jul 16
2
HELP - Save drop down list using "collection_select"
Each post has a single category, which I''m filling a drop down list by using this: #view <p><label for="post_type_id">Category</label><br /> <%= collection_select(:id, :type_id, Type.find(:all), :id, :category) %> </p> In my Post model I have a field called "type_id" which is to be filled by the id in the Type table upon
2006 Mar 21
3
Newbie - ActiveRecord relationships
So I''ve worked through Agile Web Development with Rails and I''m now trying my first little app to get into the swing of things. Its a task tracking app where people can create tasks and assign them to others, and also log time against the tasks. I''m having trouble working out the model relationships. This is what I''ve got so far, but its not right as
2006 Apr 05
4
Why does titleize remove hyphens?
item.title = ''alpha-bravo'' item.title = item.title.titleize puts item.title alpha bravo I didn''t notice this with 1.0 - a new bug in 1.1? Joe -- Posted via http://www.ruby-forum.com/.
2006 Sep 28
3
Quick Question: Opposite of Titleize?
Anyone know what the opposite of titleize is? I want to do ''My Title" to ''my_title'' -- 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
2006 Jan 03
0
newbie question about .titlecase of .titleize
i just started to work with ROR, and made a form with scaffolding. I achieved to add some extra inputvalidation but i also want to add some code that changes some specific textfields with the .titlecase / .titleize and then stores it to the database. I had to add the validation code to the model file, is this also the place to add the titlecase ? the columname of the regarding textfield is
2009 Aug 11
2
Bugzilla not working following RHEL to CentOS migration
Dear listmates, I've recently moved a server from RHEL5 to CentOS 5.3 after it was decided not to renew the subscripton. Everything works beautifully except for Bugzilla, which throws MySQL errors. For example, the sanitycheck.cgi page says: # # # Bugzilla ? Sanity Check * Home * | New * | Search * | * | Reports * * | My Votes * | Preferences
2008 Jul 12
6
Create db row in my partial template
Hi, When I use script/generate scaffold for my db it automatically creates that page where I can select to add a new item to the database. In the controller, the create method looks like this: def create @user = User.new(params[:user]) respond_to do |format| if @user.save flash[:notice] = ''User was successfully created.'' format.html {
2006 Nov 01
0
Re: YAML.load(some_string) doesn't return hash?
Oleg Kh wrote: > A small problem here. As per documentation on > http://corelib.rubyonrails.org/classes/YAML.html YAML.load(string) > should just return a hash. However on my windows machine it returns > something like this: > > #<YAML::Syck::DomainType:0x36d5038 > @domain="yaml.org,2002", > @type_id="map:HashWithIndifferentAccess", >
2010 Jun 08
9
[Rails Heroku] Problem with saving object (on heroku hosting)
Hi All, I have some strange problem which appears only on heroku hosting 2.3.5 default stack (not on my local computer) I have some models. Here they are: class Contact < ActiveRecord::Base belongs_to :user belongs_to :type, :class_name => "ContactType", :foreign_key => "type_id" validates_presence_of :name, :on => :create, :message =>
2008 Jan 17
4
multiple views, and some routers
Hi, I''m new to Rails (just a Java Programmer tired of having to configure a lot of xml''s and mapping classes just to make a simple page (...)) anyway, I''m experiencing some problems with routers, i''ve created a new project using Rails 2.0 and created a scaffold for users. so i have the following: users/new.html.erb ... (and the other pages created by the
2008 Nov 26
1
Clearing form fields for a popup
I am using prototype to create modal popups for my login and register pages, but the fields are populating with the data from certain variables. For example, I have a show page that finds a user like so: @user = User.find(params[:id]) and my form uses: <% form_for :user, :url => users_path do |f| -%> so it is populating the form with the data from @user. Should I rename the @user
2013 Apr 12
1
What is the meaning of the method to_param?
Hey! Foe example i have next code: test "should update user" do put :update, id: @user.to_param, user: @input_attributes assert_redirected_to users_path end What return id: @user.to_param? -- 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 unsubscribe from this group
2011 Mar 08
1
form_tag for search bar with Rails 3.0.5
I have a controller and view that should be providing a search bar that brings up that brings up a selected record on submission. I have tried several variations, including just specifying the assets_path, but usually end up with either an error or a submission to the index action, rather than the show action. Currently, I have the following in my index.html.haml: = form_tag({:controller =>
2006 Jan 25
1
If Param not set...
Hello all, I''m developing an application which allows users to browse items for sale... Using the url localhost:3000/browse/by_type/2 (2 is the id of the category they are in) Displays the information I want, however localhost:3000/browse/by_type/ will display an error page (becuase the id param is not set) in my by_type.rhtml view, how to i check to see if the param is set? and
2007 Mar 14
11
path vs. url
When using named RESTful routes, when should one use the generated ..._path helpers, and when the ..._url helpers? Say I did this in routes.rb: map.resources :users Where should I use users_path, new_user_path, etc., and where should I use users_url, new_user_url...? Thanks! Steve --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to
2007 Oct 22
1
View spec response has no content?
I have been messing with this all night, and can''t figure out what''s going wrong here. I have a test that renders the view, and then a shared behavior checks "response" for the various tags from a rails layout. The problem is matching. If I run in the browser the page renders fine. Is there a way to output what the response contains? Here are my tests: describe
2014 Jun 08
0
Re-render partial inside a modal
*Inside my home.html.erb. I am rendering a partial inside a modal for my sign-up.* <div id="myModal" class="reveal-modal" data-reveal> <%= render partial: 'users/form', :controller=>"users", :action =>"new" %> <a class="close-reveal-modal">&#215;</a> </div> *In my Users.controller.rb, I am
2005 Dec 12
2
count sql failing with unknown table....
Hey Rails People, I''m doing my first Rails app and I''m having a newbie problem with the count method.... Mysql::Error: #42S02Unknown table ''jobs_sectors'' in where clause: SELECT COUNT(*) FROM jobs WHERE (jobs_sectors.sector_id = 1 ) Extracted source (around line #4): 1: <div class="sectors"> 2: <ul> 3: <% for sector in @sectors