similar to: newbie question - display action

Displaying 20 results from an estimated 100000 matches similar to: "newbie question - display action"

2006 Jun 05
4
Newbie question on url friendliness
If I wanted to use a friendly url, say, http://www.something.com/my-url, how would I go about doing that? I can''t define an action my-url, and I don''t want to clutter my routes up... Is there a way to do this? -- Posted via http://www.ruby-forum.com/.
2008 Dec 14
2
custom REST action - template question
Hallo phorum, i have custom rest action. routes.rb: map.resources :schools, :collection => { :graduations => :get } SchoolsController: def graduations @schools = School.graduation(true) end link somewhere in navigation: <%= link_to ''Schools with graduation'', graduations_schools_path %> All works OK for me, but Rails needs (of course) a template for controller
2014 Jun 04
0
Design question: Redirection to a "create" action.
My application should behave like this: - My application manages (among others) a resource called "Dicts", i.e. there is a dicts_controller, and my routes.rb contains a "resources :dicts". - I have a home page (starting page), which will eventually contain some user authentification (not implemente yet), and then allow the user to manage the Dicts objects. I have a
2010 Sep 03
1
Action Controller Error: undefined local variable or method `current_user'
Newbie learning Rails. I''m currently on Chp9 here: http://railstutorial.org/chapters/sign-in-sign-out#top At the end of the tutorial, rails is erroring (see below). being new to Rails and after having checked the tutorial... How do you resolve this kind of error. It''s saying current_user is not defined, and it is supposed to be defined with/Sites/sample_app/app/helpers/
2008 Aug 29
4
newbie question for installation
Hi all... just something really confused. Today I downloaded "ruby186-26.exe" according the tutorial.. then have it installed without problem then I use "gem install rails --include--dependencies" to get rails then when I use "rails testabc" for my first application I got following errors: . .. ... create script/process/reaper create
2010 Nov 04
0
Re: Train wreck getting render_to_string to work from foreign controller [SOLVED]
Just for collective knowledge as I have found no info on this problem online: I solved this by adding an .html.erb file for the "missing template", since by design or bug Rails3 will not find or render another controllers view (in my experience). Then in the new html.erb file, I just put <%= render "comparisons/display" %> because the views *are* able to find templates
2008 May 28
3
Newbie: Searcing database via user form input?
Does anyone have a tutorial on adding new parameters to the paramaters list and then creating find conditions around them? I''m wondering how I can get my index page to list only the items where some of the the databases fields match user form input. index.html.erb would be calling itself with a new parameter :searchdata So far the index.html.erb has... <% form_tag({ :action =>
2006 May 17
40
IDE recommendations?
I was wondering if there are any IDEs out there that has autocomplete features for win32. It would be perfect if it could do something akin to what DHH is doing on the screencast hosted on the rails website. http://media.rubyonrails.org/video/rails_take2_with_sound.mov Cheers -- Posted via http://www.ruby-forum.com/.
2009 Jan 07
1
Problems with EasyEclipse Ruby Rails 1.2.2.2
Hi, I''m a real newbie both in Rails and Ubuntu but I''m going to learn Ruby on Rails for a schoolproject. I''ve tried to find out what IDE is best according to different tutorials and blogs and have chosen to download easyeclipse-ruby-rails-1.2.2.2.tar.gz. My problem is that when i start the program an error popup is shown: "An error has occurred. See the log file.
2006 May 13
1
newbie question - routes.rb on server
Hello, I am new to Ruby but not to programming. I have a domain name and server space with a host who said that ruby on rails should work on the server. All I want to do is make sure that a test ruby application works online so that I can begin development on an app. I am able to get the test program to work locally but not online. In C:/ruby/projects/test/controllers/TestController.rb:
2010 Jun 21
4
Unknown action No action responded to 2. Actions: show
I''m trying to create a simple RoR application that shows me the records inside my table, provided that it is an example I''m working on the "Head First Rails" book. When I try to retrieve the record I get the following message: "Unknown action No action responded to 2. Actions: show" Why am I having that? And, how can I fix this issue? Provided that: 1- I
2009 Nov 26
9
ActionView::TemplateError (can't convert ActiveRecord::Error into String)
I cannot work out why this error is appearing. ActionView::TemplateError (can''t convert ActiveRecord::Error into String) on line #3 of app/views/button/_show_enquiry.html.erb: 1: <h1>Send us a message</h1> 2: <% remote_form_for :enquiry, :url => {:action => ''send_mail''} do | f| %> 3: <%= error_messages_for ''enquiry'',
2008 May 08
0
Controller/action not working in url
Hey guys, i am facing some problems in calling an action. see details: in sale_items controller, i have a function def saleedit --code-- render ( :action => ''saleedit'') end and i have a file in view/sale_items/saleedit.html.erb. okay. now i have one more view view/sale_items/new.html.erb. in this file i have a form like this: <% form_tag url_for(:action =>
2010 Jul 12
1
newbie: what is preferred approach for including javascript files?
Hi, What is the cost of not cacheing javascript? If that cost is serious, do I prefer to selectively include javascript files only for view where they are needed? In other words I see four options: 1) Cache everything in layouts/application.html.erb and don''t worry about selective inclusion of .js files where they are needed; 2) cache some things in (e.g., dependencies like jquery) and
2009 May 15
0
[PATCH server] final cleanup for service layer refactoring.
I've pulled out the no-longer-necessary remnants of the old way of handling auth and before_filters as well as fixing a couple bugs that had crept in along the way. Unit test fixes for the refactoring will follow in a subsequent patch. Signed-off-by: Scott Seago <sseago at redhat.com> --- src/app/controllers/application.rb | 46 ----------------
2012 Mar 06
0
Devise/Cancan Signout User On Controller Action
I have implemented Devise for Authentication and Authorization in ROR application everything seems fine but getting one issue. I have two modals "Account" and "Transactiona" , and so two controllers respectively. My Transaction Index view call one of Account Controller method like this
2011 May 19
0
Unable to find the image path via file system using the paperclip plugin through the get method
Hello all, with great difficulty , I guess I have finally been able to find the appropriate git commit of paperclip which would suit my project''s config which is Ruby 1.8.7 and rails 2.0.2. I am trying to implement a POC before I integrate paperclip in my project. The POC is basically implementing each post with an appropriate image beside it. It seems to pretty much work, its just
2009 Nov 18
4
rails newbie : routing error
After much ado about the naming of model adn controllers... model : Expense controller : Expenses route : map.resources :expenses Here I am using mysql database and created a unique index, since db:migrated created an id object and made it as primary key. Now in the def create @expense = Expense.new(params[:expense]) if @expense.save flash[:viola] = ''New expense saved.. be
2009 Sep 24
4
Action Controller ::MethodNotAllowed
Hi, Iam getting the following error ActionController::MethodNotAllowed Only get, put and delete requests are allowed. Actually, Iam trying to have multiple actions for a form to create new record. The actions for the form are cancel, save, publish and preview. here''s the config/routes.rb file code snippet for the relevant controller - Events map.resources :events, :member =>
2009 Feb 13
0
THREE MODELS PROBLEM IN 'NEW' ACTION
Hello, I have this problem : When I use three models, and associate them, then, my ''new'' action need more data to work, How can I resolv it, or I do it in the right way ? Thanks Jose. ******************** my models ************************* class Libro < ActiveRecord::Base has_many :lecciones end class Leccion < ActiveRecord::Base has_many :vocabularios