similar to: max file size

Displaying 20 results from an estimated 100000 matches similar to: "max file size"

2007 Oct 24
4
before_filter at the method level
I have used before_filter in the passed at the class level but can it be used in the method level. For example, I want to refuse a non-admin type from being able to delete anything in the entire application. Is there an easy way to do this? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the
2008 Mar 03
15
update_attributes not updating
For some strange reason I can''t get update_attributes to work. Any reason why that might be? here is my code: controller: def update @user = User.find(params[:id]) respond_to do |format| if @user.update_attributes(params[:user]) flash[:notice] = ''Your Information was successfully updated.'' format.html { redirect_to(user_url(@user))
2008 Jan 08
7
script/server: Permission denied
when I run script/server I get this error: script/server: Permission denied I''ve been running this app for awhile now. Not sure what would have caused the change. Any ideas? I''ve messed around with permissions on the script folder but nothing seems to work. thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received
2008 Jan 16
5
named route new_session not working
Anyone have any idea why a named route would NOT work? I did rake routes to make sure it was there and it was but for some reason new_session doesn''t 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. To post to this group,
2008 Feb 21
7
looping through a list
what is the proper way to loop through a list in a rails view (assuming that you need to check if it is empty or not) -- 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
2008 Jan 27
2
conditional validation
Hi, How can I validate user info under certain conditions? For example, I just downloaded a plug-in that allows me to validate phone numbers, but what I would like is to only validate the phone number if it is not blank and if the user_type_id field is equal to one. How can I achieve such a validation in my user model? Thanks, - Dave --~--~---------~--~----~------------~-------~--~----~ You
2006 Dec 02
1
How to Set Max File Size for Upload?
I used to use <input type="hidden" name="MAX_FILE_SIZE" value="100000" /> in my PHP days, but it doesn''t seem to work with Rails. I always thought MAX_FILE_SIZE was an HTML spec, but upon a little research, it looks like it is PHP specific. Can anyone confirm? Anyway, I want to prohibit a user from uploading large files. For instance, the user has the
2008 Jun 19
4
Why can't I access Webrick web server from other computers?
Hi everyone, I have a rails project running on Ubuntu. When I ran it on localhost http://localhost:3000, it worked perfectly. But when I tried to access from other computers in the same network by either http://hostname:3000 or http://[ipaddress]:3000, I got a "Internet Explorer cannot display the webpage" error. I double checked my ubuntu with iptables, no rules are defined: iptables
2008 Apr 03
5
Is there a rails Gimp plugin?
Hi, In my app pictures can be uploaded. I want to do two things to the pictures: 1- Add a watermark 2- Add an effect to the picture (colorize) I can do that manually with Gimp and then upload. But how could I make the application to that automatically? Any suggestions for plugins? Regards -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You
2008 May 09
4
Validating Uniqueness From Two Database Tables?
Well, I''m working on adding a new type of user (organization) to my application, using a different database table than the standard User table (in the end, I think it works out being easier to deal with than creating another column in the original User table for account type). However, I''m running into a user registration problem. I can register both types of users fine,
2006 Nov 17
8
Basic search, quick question
Hi, I know there are other threads about this topic, but I''ve checked and none seem to help my problem. I''m trying to get a simple search to work on my Rails app, but I get a "Couldn''t find Recipe without an ID" error when I search. Here''s what I have: list.rhtml <%= start_form_tag :action => ''find_recipes'' %>
2006 Jun 11
47
Ruby on Rails and CakePHP Comparison
>From a development standpoint, what are the features that make Ruby on Rails a better choice compared to CakePHP? -- Posted via http://www.ruby-forum.com/.
2008 Jun 24
1
cache issue with attr_accessor field
Hi, I''ve got a model with the following attribute added: attr_accessor :level which does not exist in the database. After putting instances of this model in the cache (using Rails.cache.fetch(''foo'') { Category.all } ), when I retrieve it back from the cache, then trying to access .level gives: undefined method `level'' for #<Category:0x34d50a0>
2006 Jul 21
4
max upload file size
Can any one tell me if Rails has a max file size upload limit? and if so what is it and can I change it? Cheers. -- Posted via http://www.ruby-forum.com/.
2009 Feb 15
2
Collapsible Fieldset
Hey there, (First steps in Ruby and Rails...) I''m trying to make a fieldset collapsible, like they are, for example, on many Drupal pages. What I''ve figuared out is the following: <fieldset id="addressdata" class="collapsible collapsed"> <legend> <%= link_to_function("Show/Hide Addressdata") { |page| page[:
2008 Apr 15
4
ActiveRecord::StatementInvalid in BlogController#index
Hello. I''m trying to do the video tutorial "how to build a blog engine in 15 minutes with ruby on rails" from the main rubyonrails website, and I''m getting an error when I try to use scaffold :post after editing my config file for the mysql database. Here is the exact error I''m getting: ActiveRecord::StatementInvalid in BlogController#index
2005 Dec 17
9
How to clear sessions with cron?
Anyone got a quick code snippet I can add to my crontab? Since Rails doesn''t do any housekeeping, my /tmp directory just keeps getting fatter and fatter. I found this useless snippet in the Agile book: find /tmp/ -name ''ruby_sess*'' -ctime +12h -delete Fedora Linux complains about the ''h'' in 12h, then if you remove the ''h'' he
2008 Apr 07
7
Saving attribute
Something is getting lost here. def create @home = Team.find_by_user_id(current_user.id) for player in @home.players player.update_attribute(:game_id, @game.id) end end def show @players = Player.find_all_by_game_id(params[:id]) end view <%= @players.size %> # mistakenly equals zero Played with the console and everything should be working fine...
2008 Apr 10
3
option_groups_from_collection_for_select with a ActiveRecord::Base single object
Rails documentation gives examples of using option_groups_from_collection_for_select with two tables/objects. How could it be done with one? Example that almost works: I have a form to enter address from both the United States and Canada. It has the following: ====new.html.erb==== <%= select_tag( :state, option_groups_from_collection_for_select( State.countries, :country,
2008 May 09
5
dynamic models
Hi In my app , a user can create a set of question then a table is dynamily created , in the database,to store the answers of the questions. the name of the table is answers_x (x is the id of the questionniare). Is it possible to dynamicly create a model, to handle the answer_x tables ?? I can''t manually create a model then restart the server.