Hi,
I have a multitenant app and each tenant 'lives' in a subdirectory of my
app. For example:
http://www.myapp.com/tenant1
http://www.myapp.com/tenant2
The problem is that if a tenant1 user logs in he automatically gains access
to tenant2 data, because my app is using the same session for all
that, but
the best solution that I can see is to duplicate the code of the first two
scopes on find_visibles.
Thanks,
Gustavo
On Mon, May 21, 2012 at 10:25 PM, Rogerio Medeiros arge...@gmail.comwrote:
try
escopo: find_visibles, lambda { find_in_coverage.find_know_missing}
2012/5/21 Gustavo de Sá Carvalho
://github.com/rails/arel.
On Sat, May 19, 2012 at 12:17 AM, azizmb.in m...@azizmb.in wrote:
AFAIK, something like this should work:
def find_visibles
find_in_coverage | find_known_missing
end
On Fri, May 18, 2012 at 10:53 PM, Gustavo de Sá Carvalho Honorato
gustavohonor...@gmail.com
Hi all!
I've googled all over and I couldn't find anything about chaining scopes
with OR instead of the default AND.
I have an Asset model with the following scopes:
class Asset ActiveRecord::Base
(...)
scope :find_in_coverage, lambda { where('timestamp(assets.found_at) =
?',
Hi,
I'm having a lot of difficulties integrating WP and Rails sessions.
Basically what I need is when a user sign in on my Rails application, he
must be automatically logged on WP blog and vice-versa.
I've tried Single Sign-on solutions like CAS but it didn't worked. I'm
using Rails 3.1 and
Take a look:
https://github.com/nbudin/devise_cas_authenticatable
On Thu, Dec 8, 2011 at 2:43 PM, Dan King li...@ruby-forum.com wrote:
Anyone know how to combine Devise with RubyCAS client to authenticate
against a Jasig CAS server? Thanks.
-Dan
--
Posted via http://www.ruby-forum.com/.
Here are two Railscasts about Paperclip and Carrierwave:
http://railscasts.com/episodes/253-carrierwave-file-uploads
http://railscasts.com/episodes/134-paperclip
According to Ryan, Carrierwave is better. If you prefer, watch these two
screencasts and draw your own conclusions.
Regards,
Gustavo
Note that: this error only happens in production mode.
2011/7/6 Gustavo de Sá Carvalho Honorato gustavohonor...@gmail.com
On Tue, Jul 5, 2011 at 8:27 PM, David Zhang dzhan...@gmail.com wrote:
I'm using Rails 3.1.rc4 with ruby 1.9.2, and I just made a new app to test
this out. I ran your
On Tue, Jul 5, 2011 at 8:27 PM, David Zhang dzhan...@gmail.com wrote:
I'm using Rails 3.1.rc4 with ruby 1.9.2, and I just made a new app to test
this out. I ran your exact commands, except I used the standard sqlite3
development db. I did not get any errors - the scaffold worked fine, and so
You can use ERB. Take a look:
http://ruby-doc.org/stdlib/libdoc/erb/rdoc/classes/ERB.html
On Wed, Jul 6, 2011 at 6:10 AM, coolesting coolest...@gmail.com wrote:
What do you mean integrate ruby code with html?
just print the html markup if you want to output html.
like this ,
puts 'divhello
Take a look: https://github.com/jmettraux/rufus-scheduler
On Tue, Jul 5, 2011 at 4:19 PM, Andrew misbehav...@gmail.com wrote:
Hello,
I am fairly new to Ruby and Ruby on Rails. I am creating an
application that has many :groups, each with their own schedule of
events. This is a little
Hi,
I've just created a Rails application using the following commands:
$ rails new rails_test -d mysql
$ cd rails_test/
$ rake db:create
$ rails g scaffold user name:string age:integer
$ rake db:migrate
When I start the webserver and try to access http://localhost:3000/users I
got the
Hi,
this is a snippet taken from my routes file:
scope 'category' do
resources :posts
end
match '/old-posts-address.html' = redirect('/category/posts')
Is there a better way to specify the destination of the redirection, without
using the hardcoded string 'category/posts' ?
Thanks,
On Sun, May 1, 2011 at 4:57 AM, Frederick Cheung frederick.che...@gmail.com
wrote:
On 1 May 2011, at 03:20, Gustavo de Sá Carvalho Honorato
gustavohonor...@gmail.com wrote:
Hi,
I'm starting to use Test::Unit to create unit tests for my Rails
Applications/Plugins. I don't have much
Hi,
I'm starting to use Test::Unit to create unit tests for my Rails
Applications/Plugins. I don't have much experience in Ruby Unit Testing. The
problem is that the output report is very simple and it is very difficult to
discover where is the error. Test::Unit does not show the line number of
Hi,
I'm having problems with serialize helper method. The data serialization is
OK, the problem is when I retrieve the object from database later the
serialized attribute is not loaded (=nil). I'm trying to implement the
Serialized LOB design pattern, do you think there is a better way to do it?
On Sat, Apr 2, 2011 at 1:54 PM, Frederick Cheung frederick.che...@gmail.com
wrote:
On Apr 2, 2:25 pm, Gustavo de Sá Carvalho Honorato
gustavohonor...@gmail.com wrote:
Hi,
I'm having problems with serialize helper method. The data serialization
is
OK, the problem is when I retrieve
Serialization is OK. I think the problem is in deserialization.
2011/4/2 Gustavo de Sá Carvalho Honorato gustavohonor...@gmail.com
On Sat, Apr 2, 2011 at 1:54 PM, Frederick Cheung
frederick.che...@gmail.com wrote:
On Apr 2, 2:25 pm, Gustavo de Sá Carvalho Honorato
gustavohonor
Hi,
to serialize an array to xml we can use:
an_array = [ 1, 2, 3]
an_array.to_xml
But to I can't find a way to convert back XML to array. I didn't find a
method Array.from_xml like Hash.from_xml.
Any ideas?
Thanks,
Gustavo
--
You received this message because you are subscribed to the
Hi,
what do you recommend to do full-text search in Oracle with Rails?
There are some plugins like acts_as_sorl, but all plugins that I've
found seems to be discontinued.
Thanks,
Gustavo
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To
On Fri, Dec 17, 2010 at 12:55 PM, Marnen Laibow-Koser
li...@ruby-forum.comwrote:
Gustavo de Sá Carvalho Honorato gustavohonorato wrote in post
#969047:
Hello,
What are the good practices to deploy an Rails database in production?
It is
said that is unsafe to run database migrations
and
unsustainable approach in production. These are scary words.
On Fri, Dec 17, 2010 at 1:58 PM, Marnen Laibow-Koser
li...@ruby-forum.comwrote:
Gustavo de Sá Carvalho Honorato gustavohonorato wrote in post
#969077:
On Fri, Dec 17, 2010 at 12:55 PM, Marnen Laibow-Koser
li...@ruby-forum.comwrote
On Fri, Dec 17, 2010 at 2:48 PM, Marnen Laibow-Koser
li...@ruby-forum.com wrote:
Gustavo de Sá Carvalho Honorato gustavohonorato wrote in post
#969091:
The latter is a flawed and unsustainable approach (the more migrations
you'll amass, the slower it'll run and the greater likelihood
On Fri, Dec 17, 2010 at 4:07 PM, Marnen Laibow-Koser
li...@ruby-forum.com wrote:
Gustavo de Sá Carvalho Honorato gustavohonorato wrote in post
#969112:
On Fri, Dec 17, 2010 at 2:48 PM, Marnen Laibow-Koser
li...@ruby-forum.com wrote:
It suggests nothing of the kind, since it's specifically
Hi,
after changing a primary key column name, the auto-increment information
(MySQL) and sequence (Oracle) are lost. What is the correct way to rename
primary keys?
Thanks,
Gustavo
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post
On Tue, Dec 14, 2010 at 2:39 PM, Marnen Laibow-Koser
li...@ruby-forum.com wrote:
Gustavo de Sá Carvalho Honorato gustavohonorato wrote in post
#968329:
Hi,
after changing a primary key column name, the auto-increment information
(MySQL) and sequence (Oracle) are lost.
So what
On Wed, Dec 8, 2010 at 10:19 PM, Marnen Laibow-Koser
li...@ruby-forum.com wrote:
Gustavo de Sá Carvalho Honorato gustavohonorato wrote in post
#967278:
Hi,
how can I specify the order of included JavaScript files using
javascript_include_tag :all?
I don't think you can.
It's
On Thu, Dec 9, 2010 at 12:41 AM, Victor Cisneiros li...@ruby-forum.com wrote:
replacing this
td%= link_to 'Show', book %/td
td%= link_to 'Edit', edit_book_path(book) %/td
td%= link_to 'Destroy', book, :confirm = 'Are you sure?', :method =
:delete %/td
with this
tda href=/books/%= book.id
On Thu, Dec 9, 2010 at 10:23 AM, Victor Cisneiros li...@ruby-forum.com wrote:
Sorry I have never used any profiler tool, I just read here
(http://www.infoq.com/articles/Rails-Performance) that the link_to
helper can be slow and tried removing it
Have you tried erubis? It says to be 10 times
Hi,
how can I specify the order of included JavaScript files using
javascript_include_tag :all?
Thanks,
Gustavo
--
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-t...@googlegroups.com.
To
Hi,
I'm using MySQL for development and Oracle for testing and production. I
need to create a database view with migrations and this feature is not
available through migration DSL, so, to create the view, I'll need to put
raw SQL code in migration.
What is the best way to do this, keeping the
Thanks Marnen,
I didn't know this plugin. I've read the documentation, but in his example I
can't see how to change the columns names of the view. Is it possible?
Thanks again,
Gustavo
On Tue, Dec 7, 2010 at 3:44 PM, Marnen Laibow-Koser li...@ruby-forum.comwrote:
Gustavo de Sá Carvalho
Hi,
have you created the Rails project using 'rails projectname' command?
Regards,
Gustavo
On Tue, Dec 7, 2010 at 4:06 PM, Tara Keane li...@ruby-forum.com wrote:
I'm following a book and I just created a project. I'm in the project
directory (on Windows 7) and in cmd line I typed:(as per
On Tue, Dec 7, 2010 at 4:29 PM, Marnen Laibow-Koser
li...@ruby-forum.com wrote:
Please quote when replying.
Gustavo de Sá Carvalho Honorato gustavohonorato wrote in post
#966932:
Thanks Marnen,
I didn't know this plugin. I've read the documentation, but in his
example I
can't see how
On Tue, Dec 7, 2010 at 6:25 PM, Marnen Laibow-Koser
li...@ruby-forum.com wrote:
Gustavo de Sá Carvalho Honorato gustavohonorato wrote in post
#966984:
On Tue, Dec 7, 2010 at 4:29 PM, Marnen Laibow-Koser
li...@ruby-forum.com wrote:
I don't know. I've never used it. But the example sort
On Tue, Dec 7, 2010 at 6:49 PM, Marnen Laibow-Koser
li...@ruby-forum.com wrote:
Gustavo de Sá Carvalho Honorato gustavohonorato wrote in post
#966998:
On Tue, Dec 7, 2010 at 6:25 PM, Marnen Laibow-Koser
li...@ruby-forum.com wrote:
`dump_with_views'
/home/gustavo/.rvm/gems/jruby-1.5.2
2010/12/7 Gustavo de Sá Carvalho Honorato gustavohonor...@gmail.com:
On Tue, Dec 7, 2010 at 6:49 PM, Marnen Laibow-Koser
li...@ruby-forum.com wrote:
Gustavo de Sá Carvalho Honorato gustavohonorato wrote in post
#966998:
On Tue, Dec 7, 2010 at 6:25 PM, Marnen Laibow-Koser
li...@ruby-forum.com
Hi,
I'm experiencing problems with decl_auth when using a database with users
table and columns names different from default. When I try to register an
new user using the register form, I got the following error:
*
*
* ActiveRecord::RecordNotFound in UsersController#create
Couldn't find Role
Actually, decl_auth guys told me that the problem is not with decl_auth. I
think the problem could be with nested attributes. Anyone has a clue of what
is this problem?
2010/11/25 Gustavo de Sá Carvalho Honorato gustavohonor...@gmail.com
Hi,
I'm experiencing problems with decl_auth when using
39 matches
Mail list logo