search for: endend

Displaying 20 results from an estimated 21 matches for "endend".

Did you mean: ended
2014 Mar 31
0
Rails Engine ActionController::UrlGenerationError on functional tests
...d # test/dummy/config/routes.rbRails.application.routes.draw do mount MyEngine::Engine => '/my_engine'end # app/controllers/my_engine/cats_controller.rbmodule MyEngine class CatsController < ApplicationController def show render json: { hello: 'world' } end endend # test/controllers/my_engine/cats_controller_test.rbmodule MyEngine class CatsControllerTest < ActionController::TestCase test 'should get success' do get :show, id: 42 assert_response :success end endend Here is an example of test return: 1) Error: MyEngine:: C...
2013 Oct 25
6
Migrate postgresql database to uuid
Hi all, I am using rails 3.1 and ruby 1.9.3,Now i want to use uuid concept in rails 3 for existing data so i did like :- create_table :posts, :id => false do |t| t.string :uuid, :limit => 36, :primary => true end ActiveRecord::Base.class_eval do # old rails versions set_primary_key ''uuid'' before_create :generate_uuid def generate_uuid self.id =
2013 Jan 30
2
A lot of dovecot/imap processes
...feature? I noted that if I disable it I still getting news mails without having to check for new mails manually - . I noted that dovecot is creating a lot of process (dovecot/imap and dovecot/imap-login) and is requiring more and more RAM. I think that every login starts a process but never is endend. The output of /*ps aux | grep dovecot | wc*/ is increasing until 250 lines aprox. I think that is limited by process_limit = 256. But if I put process_limit = 100, in the log appers a message that dovecot is aborting logins (and I noted that new connections sometimes couldn't login). Anyw...
2018 Jan 24
1
Split brain directory
...]) as own changelog is 0, same as client-13 (glusterserver02.mydomain.local:/bricks/video/brick3/safe) as my understanding, such "dirty" attributes seems to indicate no split at all (feel free to correct me). Some days ago, I issued a "gluster volume heal vol-video full", which endend (probably) that day, leaving no info on /var/log/gluster/glustershd.log nor fixing this split. I tried to trigger a self heal using "stat" and "ls -l" over the splitted directory from a glusterfs mounted client directory, without having the bit set cleared. The volume heal info...
2013 Jun 18
1
Getting rspec error: Net::SMTPServerBusy: Relay access denied
...re ''rspec/autorun'' require ''capybara/rspec'' Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f} RSpec.configure do |config| config.use_transactional_fixtures = true config.infer_base_class_for_anonymous_controllers = false endend Spork.each_run do FactoryGirl.reloadend test.rb: Upficial::Application.configure do config.whiny_nils = true config.consider_all_requests_local = true config.action_controller.perform_caching = false config.action_mailer.delivery_method = :testend The test itself is very straight...
2013 Jun 22
4
ActiveRecord::Base.transaction - SystemStackError - stack level too deep:
...ce: ''Resource was successfully created.'' } format.json { render json: @resource, status: :created, location: @resource } else format.html { render action: "new" } format.json { render json: @resource.errors, status: :unprocessable_entity } end endend **Transaction** class ResourceObject def self.create_teacher_resource(params, teacher) begin ActiveRecord::Base.transaction do # Create Resource @resource = Resource.new @resource.resource_name = params[:resource][:resource_name] @resource.resource_typ...
2013 Sep 18
2
Accessing model attributes in ActiveSupport::Concern module
...ginal_filename), "wb") do |f| if f.write new_image.read delete_image pic_link = new_image.original_filename return true #everything went fine else return false #return false if new image could not be written end end endend The error I get: undefined local variable or method `image_dir'' for #<Job:0x007f8a93b9e8d8> on this line: File.open(Rails.root.join("public", "images", image_dir, new_image.original_filename), "wb") do |f| Did I miss something or did I oversee somet...
2011 Nov 28
4
getting a subdomain name in model.
Hi all, I am facing problem in getting subdomain name inside the model. The following is my setup. I am using cancan for authorization.I wanted a specific condition in Ability.rb ( the file which is placed in models if we install cancan gem). Below is the condition I wanted: ========================================================= user ||= User.new # guest user (not logged in) if
2013 May 02
1
trouble-with-capybara-and-rspec-on-a-new-model-spec
...: { with: VALID_EMAIL_REGEX }end Controller: class MailersController < ApplicationController def new @mailer = Mailer.new end def create @mailer = Mailer.new(params[:mailer]) if @mailer.save redirect_to root_path else render ''new'' end endend Integration test: require ''spec_helper'' describe "Mailer pages" do subject { page } describe "mail us" do let(:submit) { "Send my Mail"} before { visit mailers_path } describe "with invalid information" do it...
2005 Dec 02
0
RE: How to test for controller
There is a reason the controller is called *controller*. The controller should be making this type of decision. I would do it this way: Class FooController < ApplicationController def bar @side_nav = :display_admin End def baz @side_nav = :hide_admin EndEnd In the view: <% if @side_nav == :display_admin %> ... <% end %> In your application controller, you can set a default value for the @side_nav variable to avoid needing to set it in every action -----Original Message----- From: Rick Olson [mailto:technoweenie-Re5JQEeQqe8AvxtiuM...
2013 Jul 09
0
How to move create method into worker(sidekiq)?
how to move create method into worker(sidekiq)? photos_controller.rb def create @project = Project.find(params[:project_id]) @photo = @project.photos.build(params[:photo]) @photo.user = current_user if @photo.save redirect_to image_upload_project_path(@project) endend -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this gro...
2013 Sep 30
0
TypeError: no implicit conversion of Symbol into Hash when submitting form to upload files
...ot;name" => read_attribute(:upload_file_name), "size" => read_attribute(:upload_file_size), "url" => upload_file.url(:original), "delete_url" => upload_file_path(self), "delete_type" => "DELETE" } endend Inventory: class Inventory < ActiveRecord::Base belongs_to :upload_filesend Material List: class MaterialList < ActiveRecord::Base belongs_to :upload_filesend _form: <%= form_for :upload_files do |f| %><h3>Upload Inventory</h3><%= f.file_field :inventory %>&l...
2013 Sep 04
2
Speed up image processing of Paperclip in Acceptance Tests
...I think, even feature specs are intrinsic slow specs. Then I had some inspect and found out most of the Slow factory was caused bypaperclip. We had model using paperclip here: FactoryGirl.define do factory :asset do image Rails.root.join(''spec/fixtures/sample.jpg'').open endend So I wonder if there''s a way like test mode for paperclip to speed up tests. I have simple solution here: Just copy the original file instead of actually crop it. The stackoverflow link: http://stackoverflow.com/questions/18605203/speed-up-image-processing-of-paperclip-in-acceptance-t...
2020 Mar 25
2
Plotmath on Fedora 31 broken with with pango >= 1.44 - workarounds?
...what leading edge, but not as much as people think) https://docs.fedoraproject.org/en-US//packaging-guidelines/FontsPolicy/#_font_file_formats PS font users need to switch to OpenType fonts or work with their prefered font upstream to convert in modern well supported formats (font format wars have endend last millenium, even before the browser wars ended, it?s long past time to deprecate the losers). That?s normal IT format obsolescence. That being said, that?s not what is happening here. R brought this all on itself by hardcoding a Windows-only ?Symbol? font family name in its default conf. Li...
2013 Oct 02
2
When overriding the registration controller from devise, is it possible to access the newly created
...super end def create super create_folder end def update super end def create_folder path = Pathname.new('':rails_root/tmp/'') directory_name = ":current_user" Dir.mkdir(path, directory_name) unless File.exists?(directory_name) endend routes.rb devise_for :users, :controllers => {:registrations => "registrations"} I followed this<http://stackoverflow.com/questions/3546289/override-devise-registrations-controller> to override the registration controller. 1. Should I leave it there or move it to the...
2020 Mar 25
3
Plotmath on Fedora 31 broken with with pango >= 1.44 - workarounds?
Dear list On Fedora 31 the pango library has recently updated to version >= 1.44 and in doing so has switched to using the HarfBuzz library (from FreeType) and dropped Adobe Type 1 font support. This causes problems with plotmath as all bar one of the glyphs doesn't render (see attached PNG image if it makes it through the list filters - if not I have shared a copy via my google drive:
2013 Oct 27
5
run simple method from Helper on button click
Greetings, I''m new to rails and currently having couple problems about how to add javascript functionality into rails. I have a simple method in the helper and i want to run this code on button click. ------------------------------------------------------------------ module PagesHelper def show_message "simple output" end end
2001 Nov 26
3
Encoding or Playback problem?
Hi all, Have trouble encoding / playing back OGG using WinAmp + plugin. I encoded the files from .WAV with Ogg drop RC2. Seems to be ok. When I try and play them back though I get very very weird sound effects (some kind of "wobbling", some bass frequencies that are usually in the background seem to get more emphasised and they seem to have some kind of strange echo / reverb to it
2006 May 26
13
win32-dir, unicode
Hi, I''ve got a preliminary version of the pure Ruby version of win32-dir in CVS. However, I was hoping to work out the Unicode issue. Run this: from = "C:\\test" to = "?????" Dir.mkdir(from) unless File.exists?(from) Dir.create_junction(to, from) It works, but my explorer (and dos) window shows the name garbled. I don''t think it''s a font
2012 Dec 01
6
Why does 'extend ActiveSupport::Concern' cause `undefined method 'recycle!'`?
Working on Rails Engine. I want to make the controllers customizable whereever the Rails Engine is used. Therefore, I was trying to use `extend ActiveSupport::Concern` on the Engine controller class and include it in MyRailsApp. https://gist.github.com/4185823 # code in my rails engine moduel MyEngine class SomeController extend ActiveSupport::Concern def engine_some_method