similar to: *Very* basic layout question

Displaying 20 results from an estimated 3000 matches similar to: "*Very* basic layout question"

2006 Feb 16
5
filter a list
I''d like to add some filter choices to display a list of items. These items has some boolean fields for example, and would like to have a checkbox at the top of the window to let me select how to filter the list. here''s what i put in my controller if @params[:filter].nil? @params[:filter] = { ''sent'' => "1"} end ... generate the corresponding
2005 Dec 27
4
acts_as_versioned
Hi, I'm integrating acts_as_versioned (ar-versioned.rubyforge.org) in my customized CMS rails application to set up revision control for pages. Getting and viewing versions works allright, but when I try to revert to a version in the following way, nothing happens to the actual data in the object. Link from page: <%= link_to image_tag('revert'), :action => 'do_revert',
2005 Dec 29
2
form_remote, getting data from submit
Hi list, I'm writing a little survey application, and surveys are generated dynamically. I use form_remote_tag and AJAX to submit the form to a method 'submit' in my 'survey' controller. The view generates the form as: <tr> <td>Question 1?</td> <td><input id="resultset_1" name="resultset[1]" size="30"
2006 Jan 17
2
Open new window
First, I''m *very* new in rails, i''m loving it and didn''t encounter any problems in the simple tasks i''m doing yet. What I''d like to do is to open a new window containing the info of a Model (something like the show scaffold method) with a simple "close" link to close the window. Can someone please give me some directions? thanks in advance.
2013 Jan 22
2
Rails 4: Should a HEAD request not be handled like a GET for CSRF protection?
I am running a Rails 4 app in semi-production and I constantly get exceptions from crawler bots that use a HEAD HTTP method, which causes the CSRF protection to kick in. Shouldn''t HEAD requests normally be handled like GET requests? I am not sure if I''m just being stupid or that hit is a bug somewhere. Michiel -- You received this message because you are subscribed to the
2006 Jan 11
1
Keep ketting weird error, NoMethodError in Admin#create_survey Keep getting ''undefined method `assign_variables_from_controller'' for #<Survey:0xb7462244>''
Hi list, I keep getting the following error: NoMethodError in Admin#create_survey undefined method `assign_variables_from_controller'' for #<Survey:0xb7462244> contents of Admin#create_survey is: @template = Survey.find(params[''survey''][''id'']) render :layout => false I have no idea where this comes from, bug in Rails? -- Michiel Sikkes
2006 Jan 20
1
form_tag and multiple buttons inside problem
Hi, I have a bit of a problem with a form in rails. Well, the problem really is me not fully understanding the mechanism of the form_tag, so here''s what i try to do: The idea is to present a some edit fields for some @product attributes and then present a table showing the @product.pieces (pieces for every @product) and to include a "Edit Piece" and "Delete Piece"
2006 Aug 14
8
How search engine friendly are RoR sites?
I am a total RoR virgin, and took my first steps this weekend into the Ruby world. A lot of sites I create need to be as SEO friendly as possible, particularly for google. Before I delve any further, can anyone tell me how friendly the dynamic URLs or if there is the usual rewrite mod for rugby? Thanks Mike -- Posted via http://www.ruby-forum.com/.
2006 Feb 25
2
A Couple of Questions
Hi All, I have been using Ruby and Rails for only a few short days and I am loving it so far. I have a couple of questions relating to a specific project I am working. 1. I am wondering about sessions expiring after a set period of in activity and what would be the easiest way to set it up. 2. I would like to be able to users on the system. Each of these users has a login of there own. Each
2006 Aug 12
7
Redirect back to last page?
I have a few pages where a user may do something (add tags, login, etc) and I would like to redirect them back to the last page they were at before calling that action. Is there an easy way to do this? -- Posted via http://www.ruby-forum.com/.
2006 Jan 06
2
replace unkown action with 404
is there a way to replace unkown action error with a pretty 404 page ? I set the ErrorDocument 404 in .htaccess, however when someong goes to http://www.mysite.com/bogus i would like it to show a 404 error instead of just "Uknown action". Is this possible with a rescue or something? adam -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 May 11
3
sanitize dangers
I''ve noticed that it is possible to pass javascript unaltered through the sanitize function using CSS. For example: sanitize( "<style type=''text/css''>body{background-image:url(''javascript:window.alert(1)'') }</style>" ) IE will execute the javascript. Firefox will not. I haven''t tried it with any other browsers.
2006 Jun 08
8
Routing help.... it is so difficult!
hi guys, sorry to trouble you all but i really dont understand how this routing thing work... it seems easy but it just dont work for me! here''s the situation : my url b4 : http://127.0.0.1:3001/admin/login my url after: http://127.0.0.1:3001/burninglegion/admin/login i wanna do something like this so i went to the routes.rb and type this: ActionController::Routing::Routes.draw do
2006 May 14
6
file and directory layout below app/models
Hiall, Is it possible to organize my model files below app/models into subfolders? E.g. I would like to put admin related models into their own subfolder. This kind of structuring works for controllers and views (scaffolding creates the right subfolder-model mappings), but app/models always stays flat. I''d really like to be able to group my code into logical, well packages :-) Yes, I
2007 Feb 23
2
how to remove spaces from phone number
Hi, I need to allow login based on the phone number. During the signup they can give the number in any format with spaces, slash or (). But for storing in database and then during login to compare I just want the 10 digit number. How can I remove the special char from phone number before storing to db ? Thanks. -- Posted via http://www.ruby-forum.com/.
2006 Jan 17
5
simple question
How do I pass parameters from one controller to another during redirect_to command? I want to pass both model and non-model objects. The solution I use is via session, but I rather pass it as parameters to the redirect_to Thanks. -- Posted via http://www.ruby-forum.com/.
2006 Jan 11
2
Wiki Home Page Has Spam Links
It seems the wiki-spam bot has been at work again. There are numerous hidden links toward the top of the page that might be better gardened out right away, if you know what I mean ;-| -- Posted via http://www.ruby-forum.com/.
2006 Jan 06
3
Getting model class by string
Hello, I have an interessting problem, I''m not sure how to solve :-) I have the name of a model in a variable like this: My model is called Article My var contains "Article" Now - How do I get the model class, so I can call Article.find, Article.new etc ... ? Greetings, Gitte Wange
2006 Jan 25
11
Executing Ruby code that is inside a string
I would like to put Ruby code inside a string, between <%= %> tags, and have the code inside the tags executed when the string is displayed. Is this possible? -- Posted via http://www.ruby-forum.com/.
2006 Jun 15
3
Need help creating a clever route
What I want to do is wrap all the scaffolded administrated pages for my webapp into an admin folder in the controllers and views folders. So... /app /controllers /admin issue_controller.rb article_controller.rb topic_controller.rb ... etc. ... /views /admin /issue _form.rhtml edit.rhtml list.rhtml new.rhtml