similar to: problem finding find current page

Displaying 20 results from an estimated 40000 matches similar to: "problem finding find current page"

2010 Mar 05
15
Three submits, one controller
I have a ''new'' page with a submit for creating stories. On the ''show'' page the submit allows a user to enter comments. I now want a ''edit'' page for the stories with another submit for updates. I have used the ''create'' and ''update'' methods in the stories_controller on the ''new'' and
2011 Jan 15
3
respond_with javascript
My ajax stopped working when I switched to using respond_with. For my Votes, I have the create action and the corresponding create.js.erb, and respond_to :html, :js, :xml in the controller. Heres the log when I try and create a vote: Started POST "/stories/3-asdfasdf1111/votes" for 127.0.0.1 at Fri Jan 14 20:46:36 -0800 2011 Processing by VotesController#create as */* Parameters:
2010 Jun 17
7
Why do rails calls a method when I'm calling a property?
Well, I''m starting on RoR, so I got a Book called simply rails...Following the steps in it sometimes when I try to call a property, the browser shows me the next exception: undefined method `name'' for nil:NilClass I don''t know why...here''s my controller: #Controller starts here class StoriesController < ApplicationController before_filter :login_required,
2012 Jul 17
24
Static Pages from Railcast
Hi everyone, I need several pages to be static but also modify when requested. I try following the railcast from Ryan at http://railscasts.com/episodes/117-semi-static-pages?view=comments Here what I have done!! rails g scaffold Pages name:string permanentlink:string title:string author:string access_level:string is_published:boolean meta_description:string meta_keyword:string
2011 Jul 27
20
Rails, jquery and Ajax
How do I make an ajax call and then update a div with a partial? I''ve tried this but it''s not working. Comment is created but the partial is not loaded. //view <a href="#" id="testlink">Testlink</a> <div id="commentlist"> </div> //controller def new @comment = Comment.new @comment.save
2013 Oct 21
4
Strange behaviour with ActiveRecord has_many collections, Rails 4 compared to Rails 3
Hi All, I have been told to post discussion based topic on here instead of the GitHub Issues. I thought this ''could'' be a bug, but just need some clarification really. The issue I posted is here <https://github.com/rails/rails/issues/12597>, does anyone have any thoughts? Again: https://github.com/rails/rails/issues/12597 Thanks a lot. -- You received this message
2010 Jul 27
7
trouble with remote_form_for & html_update
I have a form that accepts comments and adds them to a list without refreshing the page. This is the html: <div id=''aremark''> <%= render :partial => ''comment'' %> </div> <% remote_form_for :comment, :url=>story_comments_path(@story), :html => { :id => ''comment'' } do |form| %> <h5><label
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 <
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 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
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 <
2010 Aug 06
4
Object/Record foreign key IDs set to zero
Hello, Hope no one minds me just jumping in here with a question. I''m completely new to Ruby on Rails. I''ve been reading "Simply Rails 2", and following their examples. I reached a point where the unit tests were unexpectedly failing. Upon investigation, I discovered that when Rails loads the fixtures, the foreign keys aren''t being populated with the foreign
2010 Nov 20
6
syntax error, unexpected tSTRING_BEG
Rails is throwing this error C:/Ruby/Depot/app/views/products/index.html.erb:28: syntax error, unexpected tSTRING_BEG, expecting keyword_do or ''{'' or ''('' ...er.privilege == 50 ? {link_to ''Show'', product} : ''a'' );@out... in line <%= current_user.privilege == 50 ? {link_to ''Show'', product} :
2010 Apr 14
35
Conditionally adding a link to a form -- how?
I''ve got two entities created by scaffolding: Expense & Vendor In Expense#new there''s a form with a Vendors-drop-down and a NewVendor- button. The latter button brings up Vendor#new. The Create button in Vendor#new brings up Vendor#show with Edit & Back links. I want to append a third link conditionally to Vendor#show: if the Expense#new form led to the Vendor#show
2010 Nov 04
9
Delete action is not working and redirects to edit action
Hello, i have a strange problem here. I have made a teacher controller using scaffold. All actions work fine but the delete does not. When i click the delete link, it redirects me to the edit of this teacher. I have restarted the server and i have tried in firefox (i use chrome) but problem still remains. Here is the code from my view. <%= link_to(image_tag("/images/
2010 Nov 16
15
acts_as_taggable, undefined method 'empty?'
I''ve tried out ''acts_as_taggable'', ''acts_as_taggable_on'' and ''acts_as_taggable_on_steroids'' and all of them output "undefined method ''empty?''" with the tag_cloud action. I am following the guides precisely. Yet I can find no references to this error anywhere, so I must be doing something wrong... I am on
2011 Nov 02
4
undefined method `updated_at' for #<Classified:0x686c5e4>
HEllo, I have the following problem with rails, I am new in this...is there anyone who explain to me what´s happens? Thanks See below: NoMethodError in Classified#show Showing app/views/classified/show.rhtml where line #17 raised: undefined method `updated_at'' for #<Classified:0x686c5e4> Extracted source (around line #17): 14: 15: <strong>Date Posted:</strong>
2010 Nov 18
7
Rails 3 ActiveRecord queries - I'm missing something very BIG
Hi, I know I am missing something very big regarding the changes with respect to activerecord in Rails 3. I can''t find the explanation. And I''m sure someone will kick my ass for not finding the right piece of info in the docs and guides. Please do. I have a working piece of code but I don''t like it. So. Very basic association: class Project < ActiveRecord::Base
2012 Aug 01
2
'redirect_to' taking infinite loop.
Hi, The following controller method taking me into infinite loop. Once the update action completes I want to reload the ''index'' page. May I know why it is going into infinite loop? def update Device.find_by_id( params[:device_id] ).driver = ( params[:driver_id] == 0 ) ? nil : Driver.find_by_id( params[:driver_id] ) redirect_to :action => :index, :tab =>
2012 Aug 28
16
rail s exiting
Hello everyone, I am fairly new to ruby on rails, and I come across this tutorial on treehouse where they help you make a simple version of facebook. anyway, I was writing codes, and I came across this error and I am not sure how to fix it. The error occurs after I type in rail s on the command prompt and as soon as try to look at how it looks on 127.0.0.1:3000, it gives me this error. the