ruby-on-rails-plugins

recaptcha plugin for rails

拈花ヽ惹草 提交于 2020-02-02 05:49:13
问题 I am currently using ambethia's recaptcha plugin for rails. I want to disable the message "incorrect-captcha-sol" whenever the user incorrectly enters the wrong recaptcha. How should I go about doing this? In the source file I get the following tags surrounding the error message <p class="recaptcha_error">incorrect-captcha-sol</p> 回答1: The plugin sets the flash (more precisely flash[:recaptcha_error]), i.e. it won't display message automatically. Most likely you have a piece of code that

Rails3 dynamic_form plugin not recognized?

痴心易碎 提交于 2020-01-14 13:14:27
问题 Using Ruby 1.9.2 and Rails 3 - When attempting to use <%= error_messages_for 'story' %> I get this error: DEPRECATION WARNING: error_messages_for was removed from Rails and is now available as a plugin. Please install it with `rails plugin install git://github.com/rails/dynamic_form.git`. (called from _app_views_stories_new_html_erb__1042605186_33967248__100840187 at C:/Ruby192/shovell/app/views/stories/new.html.erb:1) So I did what it said and ran the plugin install. However now I have an

How to customize flash message based on success or failure with Inherited Resources Rails plugin?

烈酒焚心 提交于 2020-01-14 03:32:07
问题 I'm using the inherited resources plugin in a 2.3.5 Rails application and was wondering how to change the flash[:notice] (or any other flash) based on the success OR failure in my create and update actions. So given the below, how do I add flash[:notice] = "All good" if success ... and flash[:notice] = "All bad" if failure? Thanks class ArticleController < InheritedResources::Base actions :show, :create, :update respond_to :html, :json before_filter :authorize_upsert, :only => [:create,

Confused about how to install Rails plugins

浪子不回头ぞ 提交于 2020-01-12 07:00:07
问题 I found an example here showing how to install a Rails plugin. Their example shows this: ./script/plugin install calendar_helper This won't work for me because, confusingly, I don't have anything called plugin in my script directory. All I have is rails : $ ls script/ rails So Rails doesn't come with the script you need to install plugins? You need a plugin to install plugins? That doesn't seem very likely. Is something wrong with my Rails project? 回答1: You're probably on Rails 3. Replace .

jRails Alternative

南笙酒味 提交于 2020-01-11 20:21:45
问题 do you know an alternative to jrails? It's more or less outdated (uses jQuery 1.5 - now 1.7 is the current release). Does anybody know an alternative? Thanks EDIT: I know how to build the rails helper with jquery allone - but I like the rails helpers, so I dont want to use jquery allone (without jrails) 回答1: Right now there's no real alternative. However, you can install jRails then upgrade the jQuery installation simply replacing the javascript files (except jrails.js) in the javascripts

Problems With Simple captcha

南笙酒味 提交于 2020-01-06 14:01:11
问题 I have a weird issue .I am using simple captcha in forms in my rails applications. If I am using one captcha in a web page I don't have any problem. But I have a scenario of using three(3) forms in one page in which all the three forms will have the captcha . So that when I refresh the page the captcha data of the three forms are equal. When we come to database , once the page get loaded the captcha value for one particular id will be created, Without using the captcha if we refresh the page

Problems With Simple captcha

空扰寡人 提交于 2020-01-06 14:01:11
问题 I have a weird issue .I am using simple captcha in forms in my rails applications. If I am using one captcha in a web page I don't have any problem. But I have a scenario of using three(3) forms in one page in which all the three forms will have the captcha . So that when I refresh the page the captcha data of the three forms are equal. When we come to database , once the page get loaded the captcha value for one particular id will be created, Without using the captcha if we refresh the page

RoR: not able to connect paperclip to Amazon S3

我是研究僧i 提交于 2020-01-06 06:25:44
问题 I have decided to deploy my app to Heroku and I was following their tutorials. However, Im trying to connect to my Amazon S3 bucket with a paperclip plugin right now and Im getting this error: ArgumentError in Images#index Showing app/views/images/index.html.erb where line #19 raised: syntax error on line 0, col 39: `bucket: (MY BUCKET HERE) access_key_id: (MY ACCESS KEY ID HERE) secret_access_key: (MY SECRET ACCESS KEY HERE) ' Extracted source (around line #19): 16: <%=h image.created_at %>

Ruby on Rails Win7 x64?

时光总嘲笑我的痴心妄想 提交于 2020-01-01 19:31:28
问题 I've just upgraded to Win7 x64 Professional and wanted to recommence developing my Rails Apps, however I'm getting the following error : => Booting Mongrel => Rails 2.3.5 application starting on http://127.0.0.1:3344 D:/nu codes/R/ruby-1.8.7-p174-i386-mswin32/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:271:in `require_frameworks': 193: %1 is not a valid Win32 application. - D:/nu codes/R/ruby-1.8.7-p174-i386-mswin32/lib/ruby/1.8/i386-mswin32/openssl.so (RuntimeError) from D:/nu

Rails - Paperclip validating attachment size when it shouldn't be?

寵の児 提交于 2019-12-31 21:42:12
问题 I've got a rails model using Paperclip that looks like this: has_attached_file :image, :styles => { :normal => ['857x392#', :png] }, :url => '/assets/pages/:id/:basename.:extension', :path => ':rails_root/public/assets/pages/:id/:basename.:extension' validates_attachment_size :image, :less_than => 2.megabytes When attempting to create a record of this model without an attachment to upload, the validation error is returned: There were problems with the following fields: * Image file size file