search for: _thing

Displaying 3 results from an estimated 3 matches for "_thing".

Did you mean: thing
2011 Apr 06
1
Time to fix PartialRenderer#partial_path
...xtremely tedious and impossible without specifying the :partial to use. https://github.com/rails/rails/blob/master/actionpack/lib/action_view/renderer/partial_renderer.rb#L150-159 Normally this function grabs the partial to use with model_name.partial_path which is great for default views (things/ _thing.html.erb) but as soon as you call it from a controller that is nested it ends up giving you a path like controller_namespace/things/ _thing.html.erb. I can see the advantage of that (if you want different partial for @thing in your admin namespace) but I think the disadvantage of being unable to re...
2007 Jun 27
3
template.expect_render
Trunksters, I just added a couple of methods to ActionView::Base in Spec::Rails (as of r2136) that lets you do this in view examples: describe ''/things/index.html.erb'' do it "should render _thing with a collection of things" do assigns[:things] = things = [Object.new] template.expect_render(:partial => ''thing'', :collection => things) render ''/things/index.html.erb'' end end This solves two big problems - mocking nested partials an...
2008 Mar 20
0
Having trouble with a remote-crop-then-resize using attachment fu =(
...t;< @ying @ying.scale_to_scene(params[:ying], scene) avatar = Avatar.create!(:uploaded_data => params[:ying] [:uploaded_data], :content_type => ''image/png'', :filename=> "#{RAILS_ROOT}/public/images/avatars/yings/ #{@ying.id}_thing.png", :ying_id => self.id, :size => (@ying.width).to_i * (@ying.height).to_i ) avatar.ying_id = @ying.id avatar.scene_id = nil avatar.user_id = nil @ying.avatar = avatar avatar.thumbnails.clear # avatar.save...