makandra dev
github.com

...application, you can just use a controller action like this: def graph @post = Post.find(params[:id]) send_data(@post.graph.to_blob, :disposition => 'inline', :type => 'image/png', :filename => "datapoints_post_#{@post.id}.png")

File.open(cucumber_paths, 'r').each do |line| lines << line.slice(/\s+when /^?([^$]*)$?/[im]?$/, 1) # @param 1: return first matched group end paths = lines.compact.sort TextMate::UI.complete(paths, :extra_chars => " ") else

makandra dev

...the name changes as we would not want to pass an overlay_user[email] param to the controller. Setting :id explicitly will not be affected by the prefix.

apidock.com

...validation errors occur. If the form above is submitted, it will send the following params: { :post => { :tag_list => ['foo', 'bar', '', '', ''] } } Note how one empty string is sent for every check...

...attribute should contain Date values you might get unexpected behavior with forms, because every param is a string and you don't get the magic type casting that Rails would...

tutorialzine.com

...this card with tests and all caveats fixed. Related topic: JavaScript: Working with Query Parameters Javascript: Read params from url...

...attribute should contain integer values you might get unexpected behavior with forms, because every param is a string and you don't get the magic type casting that Rails would...

stackoverflow.com

Rack has a limit for how many form parameters it will parse. This limit is 65536 by default. There is a bug in Rack that will incorrectly count the number...

...submissions. The default value should also be enough for anyone if Rack counted nested params correctly. Fixes This seems to be fixed in newer versions of Rack, so you might...

...but that gem wasn't in the Gem bundle. Rack only parses 65536 form params by default Problem can occur when using the integrated Ruby Mine Debugger: Try to restart...

Both these approaches will keep your GET parameters -- and will only work for GET requests. Capybara: When /^I reload the page$/ do visit [ current_path, page.driver.request.env['QUERY_STRING'] ].reject(&:blank...

By default, Opera 11 hides any passed params and the URL's protocol until you focus the address bar. To disable hiding URL parameters, open up Tools → Preferences (Ctrl+F12...

...order to redirect all requests from redirecting-host.com to desired-host.com while keeping path and query params unchanged, change your Apache VHost to something like this: ServerName desired-host.com ServerAlias redirecting-host.com RewriteEngine On...

opensoul.org

...approach is that request has already gone through most of your application stack–parsing params, authentication, authorization, a few database lookups–so ETags are only saving you render time and...

makandra dev
gist.github.com

...instead of sub), a TypeError is raised. This is to prevent tricks like my_safe_string.gsub!(/.*/, params[:user_input...

Embedded Flash movies do not always obey element order and z-index. To fix this, set the wmode attribute to...

stackoverflow.com

...the browser side, you can serialize nestd objects to query strings using jQuery's $.param...

...Downdgrade database_cleaner from 1.4.x to 1.2.0 Use new lambda syntax: change lambda { |param| code } to ->(param) { code } Unbind gem 'i18n', '~> 0.6.0' and update fix yml erros: %{count} errors...

Best results in other decks

...commit Save movie Now change your MoviesController#create method so it prints out the params that Rails sees. For this we comment out the code that was creating the movie...

...and render the params object: def create # @movie = Movie.new # @movie.attributes = params[:movie] # if @movie.save # redirect_to @movie # else # render 'new' # end render plain: params.inspect end Note that #inspect returns a...

OpenMage

...multiple actions. [ 'caption' => $helper->__('Utilization'), 'popup' => true, // Popup new browser window. 'url' => [ 'base' => '*/*/utilization', 'params' => [ 'member_id' => $this->getMemberId(), //'plan_id => $row->getPlanId(), // No can do! ] ], 'field' => 'company_id' // Merge...

...to params: 'company_id' => $row->getCompanyId() ] ], 'filter' => false, 'sortable' => false, ]); Use callback to construct the URL: $this->addColumn('action', [ 'header' => $helper->__('Action'), 'width' => '50px', 'type' => 'action', 'getter' => [$this, 'getFilterParams'], 'actions...

Search in all decks