Displaying 3 results from an estimated 3 matches for "filmscontrol".
Did you mean:
filecontrol
2006 Jan 23
2
require rmagick
Hello,
I''m trying to use rmagick in a helper script (for auto-generating image sizes) and I''m not sure where I should be calling ''require''.
currently I have:
require ''RMagick'' at the top of my controller:
class FilmsController < ApplicationController
require ''RMagick''
but that''s giving me an error:
uninitialized constant ImageList
...whenever I try and do anything. From what I''ve read it seems that this probably a failure to require.
Looking for RMagick in my system I fin...
2006 Jan 09
1
Saving an upload
...ame(file_name)
# get only the filename, not the whole path (from IE)
just_filename = File.basename(file_name)
# replace all non-alphanumeric, underscore or periods with
underscores
just_filename.gsub(/[^\w\.\-]/,''_'')
end
end
films_controller.rb:
class Admin::FilmsController < ApplicationController
...
def create
@film = Film.new(params[:film])
@film.pictures
# Add each file to the film
params[:pictures].each_with_index {|upload,i|
ss = Picture.new
ss.uploaded_file = upload
ss.position = i
@film.pictures << ss
}...
2006 Apr 04
3
newbie - HABTM problems writing to Join Table in SQL
...p>
<p><label for="film_release_date">Release date</label><br/>
<%= date_select ''film'', ''release_date'', :order => [:day, :month, :year],
:start_year => 1900 %></p>
--------films_controller----------
class FilmsController < ApplicationController
def index
list
render :action => ''list''
end
# GETs should be safe (see
http://www.w3.org/2001/tag/doc/whenToUseGet.html)
verify :method => :post, :only => [ :destroy, :create, :update ],
:redirect_to => { :action...