Sjoerd Andringa wrote in post #949781:
> Perhaps I18n.t's :default option is overridden?
Forget about that, it merges the default scope into the options hash so
it always takes precedence.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribe
Here you can see how the 'full_messages.format' scope is applied:
http://github.com/rails/rails/blob/v2.3.4/activerecord/lib/active_record/validations.rb#L118
Maybe it'll give you some insight in why it's not working. Perhaps
I18n.t's :default option is overridden? Good luck!
--
Posted via http
It seems this feature has been added in 2.3.5
(http://github.com/rails/rails/blob/v2.3.5/activerecord/lib/active_record/validations.rb#L108).
I'd recommend upgrading as Im not aware of an easy alternative way of
doing this.
--
Posted via http://www.ruby-forum.com/.
--
You received this mess
If you're using I18n (which I think is always a good idea, even if
you're only using one language) you can do two things:
1. Define a translation for the job_role_id_short attribute:
In app_root/config/locales/en.yml:
en:
activerecord:
attributes:
my_model:
Vicer Ontero wrote:
>> And make sure you're *not* using the :update option on your remote_form.
>> 'page.redirect_to()' will generate javascript similar to Hassan's
>> aforementioned suggestion.
>
> Hi, just a note that this does not work. Because the redirect gets
> trapped inside the Ajax cal
Patrick Sullivan wrote:
> Or you could just do this:
>
> link_to "Link", "/"
True, however won't that just generate a relative url? So Link instead of http://www.mysite.com/";>Link?
I believe Guillaume requires the latter, as his views are also used
outside of his app.
--
Posted via http://ww
Sjoerd Andringa wrote:
> I dont know of a commonly used pattern for this, all of your suggestions
> seem okay. Of course you don't need to parse xml and then update an
> element, in a lot of situations just returning an html fragment and
> update some element directly wi
I dont know of a commonly used pattern for this, all of your suggestions
seem okay. Of course you don't need to parse xml and then update an
element, in a lot of situations just returning an html fragment and
update some element directly will suffice. In an application I developed
recently, wh
guillaume wrote:
> Hi,
>
> I would like to get the root path of my website using link_to in a
> view... (for example : http://www.mywebsite/controller/action/id)
> how is that possible ?
>
> (i do need it, because i use the generated code in the view outside of
> the rails app')
>
> Thanks..
i
Kip Cole wrote:
> I have several named scopes in my app. Some patterns are
> used commonly. For example:
>
> Article.published_in(publication).published.viewable_by(current_user).included_in_index
>
> Since this pattern is repeated, I'd like to be able to have a
> named_scope that embeds this
If you need this to be Ajaxified use remote_form_for instead, also check
out: http://www.caboo.se/articles/2007/4/2/ajax-file-upload, as you're
uploading file data.
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because
Hi daociyiyou ,
Try this:
def find_created_actions
unless @if_login
flash[:login]="..."
redirect_to(:controller=>"login",:action=>"login")
end
if @if_login
@[EMAIL PROTECTED]
render :update do |page|
page.replace_html 'element_id',
:p
12 matches
Mail list logo