Displaying 20 results from an estimated 7000 matches similar to: "Rails 3.1.1 why public/system content is not transferred upon deployment"
2011 May 17
2
Can't dump File ... when uploading files
I am getting this error on the redirect_to command ...
I am using Rails 3 w Paperclip to upload files ( but I tried also
CarrierWave .. same error)
I tried to change the session store from cookie-based to database ..
same error
I tried to delete the params content ...
I don''t know what to try next .. any clue ?
thanks
erwin
--
You received this message because you are subscribed to
2012 Oct 16
8
<form> tag is self-closing before input fields .. (HAML generator used)
The form is inside a table, enclosing a <tr>
= form_tag admins_backoffice_dashboards_path, :remote =>"true" do
%tr.search
%th= link_to t(:clear), "#", :id => :clearFilter
%th= select_tag :role,
options_from_collection_for_select(Role.global, :id, :name, :selected
=> @role_id )
%th= text_field_tag :email, nil, :value
2010 Aug 12
4
[Rails 3] How to test routes urls in console
I tried require ''url_writer''
but this is not the trick
what should be required/included to test the routes urls ?
thanks
erwin
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this
2012 Nov 09
8
method conditional option pattern
When I have this pattern
sign_me(@user, :event => :authentication, :subdomain => subdomain)
how can I write it to avoid sending the :subdomain option if subdomain.nil?
( if possible ..)
sign_me(@user, :event => :authentication #?, :subdomain =>
subdomain unless subdomain.nil? )
--
You received this message because you are subscribed to the Google Groups
2012 Mar 26
3
render :json not sending any data back ...
[rails 3.2.2]
I perform an ajax call :
...
$.ajax
url: " /backoffice/expenses/rate"
type: "GET"
dataType: "json"
data:
project_id: $(''#project_id'').val()
code: $(this).val()
success: (result) ->
alert result
$(''#expense_price'').val(result)
in
2008 Dec 13
2
how to import a dump .sql file in a rake task
I have a dump of some tables to be filled when the app is setup
''.../db/dataset/regions_dpt_cities_codes.sql''
I would like to execute a task similar to the >mysql source
<dump_file>
like :
ActiveRecord::Base.connection.execute("source #{path};") (which
doesn''t run fine, of course....
is it possible in a rake task ? if yes, any suggestion ?
2011 Nov 15
4
Need some guidance on running shell commands from my app..
During execution in my Rails web app, I need to create a virtual host
config on my Linux server, but I don''t know what would be the best way
to do it , here are the steps ( my_domain.com is fixed, only
my_subdomain is changing dynamically
1- create: /var/www/vhosts/my_domain.com/subdomains/my_subdomain/conf/
vhost.conf
ServerName mysubdomain.mydomain.com
.. content is always the
2009 Feb 09
2
dynamic constant assignment
I have a constant set up like that :
ALL_LOCALES
=> {"it"=>"Italian", "fr"=>"Français", "de"=>"Deutsch", "en-
GB"=>"English (UK)", "es"=>"Español (España)", "pt-PT"=>"Português",
"pl"=>"Polski", "en-US"=>"English
2011 Feb 27
10
How to store the same key multi times in a Hash ?
given an Arra tags[]
I need to produce a resulting Hash as following ..
{ "$in" => [tags[0]], "$in" =>[tags[1], ...}
in which the key should be always the same and the value being an
Array
I tried this :
myHash = {}
tags.each do |tag|
h = {"$in" => [tag]}
myHash.merge!(h)
end
but the merge! is only
2010 Aug 18
2
[Rails 3] remote_function ?
Is the remote_function still valid in Rails 3 as it seems many of the
Prototype helpers have been replaced ? (link_to_remote, ...)
where can I find any link on it ? not in the standard doc I guess ..
thanks for you feedback
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2012 Dec 04
2
[Rails 3.2] validation on create not working
class Place < ActiveRecord::Base
validates :description, :presence => true
validates :description, :uniqueness => {:case_sensitive => true, :on =>
:create }
# also tried
# validates :description, :uniqueness => {:case_sensitive => true }, :on
=> :create
On update ( in form fields, updated label, same description )
params
2011 May 16
2
Cannot get multipart => true , running well in my form when using remote => true
I have a simple form , with a file field
= form_for (Clip.new), :html => {:multipart => true} , :remote =>
true , do |f|
= f.hidden_field :user_id, {:value => current_user.id}
= f.text_field :name
= f.text_area :description
= f.file_field :image
= f.submit I18n.t(:add)
generating the html code
<form accept-charset="UTF-8"
2010 Dec 25
7
I sit possible to write it in one line ? Array init + Array loading
I am always writing it in 2 lines : ( Array init then loading the
array )
@providers = []
@authentications.map {|authentification| @providers <<
authentification.provider }
Is there any Ruby writing for writing just one line ?
thanks fyh
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group,
2012 Jan 15
2
ruby-debug19 error undefined symbol: ruby_current_thread
I am trying to deploy a Rails app ( Rails 3.0.9 / Ruby 1.9.2 ) in
production (Debian 6)
it''s running fine in development mode on localhost ( OSX)
I am getting this error from Passenger : undefined symbol:
ruby_current_thread
/var/www/vhosts/mydomain.com/rails/testsbga/shared/bundle/ruby/
1.9.1/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.so: undefined
symbol: ruby_current_thread -
2010 Mar 23
7
redirection in format.json ...
I have presently a render :json which modify the current page
if @request.save
format.html { redirect_to(@request) }
format.json { render :json => { :result => ''success'', :request
=> request_path(@request) } }
....
but I would like rather to redirect to an index page
I wrote this but it doesn''t redirect ...
format.json {
2012 Nov 29
2
[Rails 3.2] form_tag w :remote => true doesn't fire up the js format
I have a form_tag written like this :
= form_tag search_backoffice_places_path, {:remote =>"true", :id =>
:searchplaceForm } do
.. input fields
= submit_tag t(:search)
generated html is correct :
<form accept-charset="UTF-8" action="/en/backoffice/places/search"
data-remote="true" id="searchplaceForm" method="post">
...
2011 May 20
5
views w locale default template
[RAILS3]
I hesitate on how handling the locale view templates to default to
one language only ..
sending admin emails will go only to one locale ''en_GB''
should I set it up into the template name and set I18n.locale to
''en_GB''
membership_renew.en_GB.html.erb
OR
whatever locale is used , if I have :
membership_renew.html
it will be the default ?
--
2011 Dec 05
2
How to bypass a create record after validation wo error ?
I have a specific signup process to handle, and I am turning around
the solution wo finding a clear validation ...
a visitor fill in a User Registration form ( email /pwd /pwd
confirmation )
I wrote a UserValidator class to check the uniqueness of the email
field
# if no user registered w this email, then no error , can proceed to
create
User.where(:email => self.email).empty? # no
2010 Jul 08
1
[Rails3] Issue in modifying locale and redisplaying page
In a test app, I have a drop-down selection to change the language of
the site.
I use an Ajax request to an action in which the locale is changed, and
the it''s redirected to the home page
unfortunately, the locale seems to be changed but the home page
doesn''t reflect the new language ..
application_controller.rb
.. before_filter :set_locale
def set_locale
I18n.locale =
2009 Jul 01
2
Nested Forms - how to displayed the attributes content ?
I have a User model
class User < ActiveRecord::Base
has_one :account
accepts_nested_attributes_for :account, :allow_destroy => true
validates_associated :account
attr_accessible :account_attributes
is working fine, validating and updating both records (User and
Account), but I caanot display the value in the form when is updated,
ex: below the firstname is not displayed but